ETCD后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
653 B

package model
import (
"strconv"
)
const (
ETCD_VERSION_V2 = "v2"
ETCD_VERSION_V3 = "v3"
)
// Config etcd 连接配置
type Config struct {
EtcdId int32 `json:"etcd_id,omitempty"`
Version string `json:"version,omitempty"`
Address []string `json:"address,omitempty"`
TlsEnable bool `json:"tls_enable,omitempty"`
CertFile string `json:"cert_file,omitempty"`
KeyFile string `json:"key_file,omitempty"`
CaFile string `json:"ca_file,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
func (c *Config) String() string {
return strconv.Itoa(int(c.EtcdId))
}