-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
33 lines (26 loc) · 629 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"flag"
"log"
"github.com/crowdworks/cyqldog/cyqldog"
_ "github.com/go-sql-driver/mysql"
_ "github.com/lib/pq"
)
var (
// Version information embedded at build time.
version = "dev"
commit = "none"
date = "unknown"
)
func main() {
log.Printf("main: starting cyqldog (version: %s, commit: %s, date: %s)", version, commit, date)
// Parse the argument's flag.
var configPath string
flag.StringVar(&configPath, "C", "./cyqldog.yml", "path to config file")
flag.Parse()
m := cyqldog.NewMonitor(configPath)
if err := m.Run(); err != nil {
log.Fatal(err)
}
log.Println("main: end")
}