forked from coreos/etcdctl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
etcdctl.go
36 lines (33 loc) · 1.1 KB
/
etcdctl.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
package main
import (
"os"
"github.com/coreos/etcdctl/command"
"github.com/coreos/etcdctl/third_party/github.com/codegangsta/cli"
)
func main() {
app := cli.NewApp()
app.Name = "etcdctl"
app.Version = releaseVersion
app.Usage = "A simple command line client for etcd."
app.Flags = []cli.Flag{
cli.BoolFlag{"debug", "output cURL commands which can be used to reproduce the request"},
cli.BoolFlag{"no-sync", "don't synchronize cluster information before sending request"},
cli.StringFlag{"output, o", "simple", "output response in the given format (`simple` or `json`)"},
cli.StringFlag{"peers, C", "", "a comma-delimited list of machine addresses in the cluster (default: \"127.0.0.1:4001\")"},
}
app.Commands = []cli.Command{
command.NewMakeCommand(),
command.NewMakeDirCommand(),
command.NewRemoveCommand(),
command.NewRemoveDirCommand(),
command.NewGetCommand(),
command.NewLsCommand(),
command.NewSetCommand(),
command.NewSetDirCommand(),
command.NewUpdateCommand(),
command.NewUpdateDirCommand(),
command.NewWatchCommand(),
command.NewExecWatchCommand(),
}
app.Run(os.Args)
}