示例#1
0
func main() {
	app := cli.NewApp()
	app.Name = "etcdctlv3"
	app.Version = version.Version
	app.Usage = "A simple command line client for etcd3."
	app.Commands = []cli.Command{
		command.NewRangeCommand(),
		command.NewPutCommand(),
		command.NewDeleteRangeCommand(),
	}

	app.Run(os.Args)
}
示例#2
0
文件: main.go 项目: ikatson/etcd
func init() {
	rootCmd.PersistentFlags().StringVar(&globalFlags.Endpoints, "endpoint", "127.0.0.1:2378", "gRPC endpoint")

	rootCmd.AddCommand(
		command.NewRangeCommand(),
		command.NewPutCommand(),
		command.NewDeleteRangeCommand(),
		command.NewTxnCommand(),
		command.NewCompactionCommand(),
		command.NewWatchCommand(),
		command.NewVersionCommand(),
	)
}
示例#3
0
文件: main.go 项目: carriercomm/etcd
func main() {
	app := cli.NewApp()
	app.Name = "etcdctlv3"
	app.Version = version.Version
	app.Usage = "A simple command line client for etcd3."
	app.Flags = []cli.Flag{
		cli.StringFlag{Name: "endpoint", Value: "127.0.0.1:2378", Usage: "gRPC endpoint"},
	}
	app.Commands = []cli.Command{
		command.NewRangeCommand(),
		command.NewPutCommand(),
		command.NewDeleteRangeCommand(),
		command.NewTxnCommand(),
		command.NewCompactionCommand(),
	}

	app.Run(os.Args)
}
示例#4
0
文件: main.go 项目: fengshao0907/etcd
func init() {
	rootCmd.PersistentFlags().StringVar(&globalFlags.Endpoints, "endpoint", "127.0.0.1:2378", "gRPC endpoint")

	rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.CertFile, "cert", "", "identify HTTPS client using this SSL certificate file")
	rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.KeyFile, "key", "", "identify HTTPS client using this SSL key file")
	rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.CAFile, "cacert", "", "verify certificates of HTTPS-enabled servers using this CA bundle")

	rootCmd.AddCommand(
		command.NewRangeCommand(),
		command.NewPutCommand(),
		command.NewDeleteRangeCommand(),
		command.NewTxnCommand(),
		command.NewCompactionCommand(),
		command.NewWatchCommand(),
		command.NewVersionCommand(),
		command.NewLeaseCommand(),
		command.NewMemberCommand(),
	)
}