mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
Merge pull request #678 from fanyangyang/fix/coding/717
check etcd args and append
This commit is contained in:
commit
c611023c18
@ -136,6 +136,9 @@ func NewConfig() *Config {
|
||||
//AddFlag monitor flag
|
||||
func (c *Config) AddFlag(cmd *pflag.FlagSet) {
|
||||
cmd.StringVar(&c.EtcdEndpointsLine, "etcd-endpoints", c.EtcdEndpointsLine, "etcd endpoints list.")
|
||||
cmd.StringVar(&c.EtcdCaFile, "etcd-ca", "", "etcd tls ca file ")
|
||||
cmd.StringVar(&c.EtcdCertFile, "etcd-cert", "", "etcd tls cert file")
|
||||
cmd.StringVar(&c.EtcdKeyFile, "etcd-key", "", "etcd http tls cert key file")
|
||||
cmd.StringVar(&c.AdvertiseAddr, "advertise-addr", c.AdvertiseAddr, "advertise address, and registry into etcd.")
|
||||
cmd.IntVar(&c.CadvisorListenPort, "cadvisor-listen-port", c.CadvisorListenPort, "kubelet cadvisor listen port in all node")
|
||||
cmd.StringSliceVar(&c.AlertManagerURL, "alertmanager-address", c.AlertManagerURL, "AlertManager url.")
|
||||
|
@ -54,6 +54,9 @@ func (a *MQServer) AddFlags(fs *pflag.FlagSet) {
|
||||
fs.StringVar(&a.LogLevel, "log-level", "info", "the mq log level")
|
||||
fs.StringSliceVar(&a.EtcdEndPoints, "etcd-endpoints", []string{"http://127.0.0.1:2379"}, "etcd v3 cluster endpoints.")
|
||||
fs.IntVar(&a.EtcdTimeout, "etcd-timeout", 10, "etcd http timeout seconds")
|
||||
fs.StringVar(&a.EtcdCaFile, "etcd-ca", "", "etcd tls ca file ")
|
||||
fs.StringVar(&a.EtcdCertFile, "etcd-cert", "", "etcd tls cert file")
|
||||
fs.StringVar(&a.EtcdKeyFile, "etcd-key", "", "etcd http tls cert key file")
|
||||
fs.StringVar(&a.EtcdPrefix, "etcd-prefix", "/mq", "the etcd data save key prefix ")
|
||||
fs.IntVar(&a.APIPort, "api-port", 6300, "the api server listen port")
|
||||
fs.StringVar(&a.RunMode, "mode", "grpc", "the api server run mode grpc or http")
|
||||
|
@ -55,6 +55,9 @@ func NewWebCliServer() *WebCliServer {
|
||||
func (a *WebCliServer) AddFlags(fs *pflag.FlagSet) {
|
||||
fs.StringVar(&a.LogLevel, "log-level", "info", "the webcli log level")
|
||||
fs.StringSliceVar(&a.EtcdEndPoints, "etcd-endpoints", []string{"http://127.0.0.1:2379"}, "etcd v3 cluster endpoints.")
|
||||
fs.StringVar(&a.EtcdCaFile, "etcd-ca", "", "etcd tls ca file ")
|
||||
fs.StringVar(&a.EtcdCertFile, "etcd-cert", "", "etcd tls cert file")
|
||||
fs.StringVar(&a.EtcdKeyFile, "etcd-key", "", "etcd http tls cert key file")
|
||||
fs.StringVar(&a.Address, "address", "0.0.0.0", "server listen address")
|
||||
fs.StringVar(&a.HostIP, "hostIP", "", "Current node Intranet IP")
|
||||
fs.StringVar(&a.HostName, "hostName", "", "Current node host name")
|
||||
|
Loading…
Reference in New Issue
Block a user