-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
38 lines (31 loc) · 766 Bytes
/
main.go
File metadata and controls
38 lines (31 loc) · 766 Bytes
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
34
35
36
37
38
// Copyright (C) 2018. See AUTHORS.
package rothko
import (
"fmt"
"os"
"github.com/urfave/cli"
_ "github.com/vivint/rothko/database/files"
_ "github.com/vivint/rothko/dist/tdigest"
_ "github.com/vivint/rothko/listener/graphite"
"github.com/zeebo/errs"
)
var handled = errs.Class("")
// Main is the entrypoint to any rothko binary. It is exposed so that it is
// easy to create custom binaries with your own enhancements.
func Main() {
app := cli.NewApp()
app.Usage = "a time-distribution metric store"
app.Version = "0.0.1"
app.Commands = []cli.Command{
initCommand,
runCommand,
demoCommand,
}
if err := app.Run(os.Args); err != nil {
if !handled.Has(err) {
fmt.Printf("unexpected error: %+v\n", err)
}
os.Exit(1)
}
os.Exit(0)
}