-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.go
43 lines (36 loc) · 749 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
34
35
36
37
38
39
40
41
42
43
package main
import (
"os"
"github.com/WIZARD-CXY/cxy-sdn/server"
"github.com/codegangsta/cli"
)
func init() {
//to-do
}
func main() {
app := cli.NewApp()
app.Name = "cxy-sdn"
app.Usage = "Advanced network management and configuration tool for container cloud platform"
app.Version = "10.0"
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "iface, i",
Value: "eth0",
Usage: "Network Interface to bind, default is eth0",
},
cli.BoolFlag{
Name: "server, s",
Usage: "Indicate server mode or not",
},
cli.StringFlag{
Name: "expectedServerNum, n",
Value: "1",
Usage: "Indicate the Server node num",
},
}
app.Action = func(c *cli.Context) {
d := server.NewDaemon()
d.Run(c)
}
app.Run(os.Args)
}