forked from Dataman-Cloud/swan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
31 lines (24 loc) · 757 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
package main
import (
"os"
"github.com/Sirupsen/logrus"
"github.com/urfave/cli"
"github.com/Dataman-Cloud/swan/src/cmd"
_ "github.com/Dataman-Cloud/swan/src/debug"
"github.com/Dataman-Cloud/swan/src/version"
)
func main() {
app := cli.NewApp()
app.Name = "swan"
app.Usage = "swan [COMMAND] [ARGS]"
app.Description = "A Distributed, Highly Available Mesos Scheduler, Inspired by the design of Google Borg."
app.Version = version.GetVersion().Version
app.Commands = []cli.Command{}
app.Commands = append(app.Commands, cmd.ManagerCmd())
app.Commands = append(app.Commands, cmd.AgentCmd())
app.Commands = append(app.Commands, cmd.VersionCmd())
if err := app.Run(os.Args); err != nil {
logrus.Errorf("%s", err.Error())
os.Exit(1)
}
}