Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKvsEmpty = errors.New("kvs is empty") ErrInvalidKey = errors.New("Invalid parameter: 'key' is invalid") ErrInvalidNpLevel = errors.New("Invalid parameter: 'namespaceLevel' is invalid") ErrConfigNonPtr = errors.New("Invalid parameter: 'config' is not a pointer") ErrConfigPtToPtr = errors.New("Invalid parameter: 'config' can't point to a pointer") ErrConfigNilPtr = errors.New("Invalid parameter: 'config' is a nil pointer") ErrUnknowResult = errors.New("unknow result type") )
Functions ¶
func GetInNamespace ¶
GetInNamespace 在某个namespace下获取配置 * key: namespace下的部分路径 * config: pointer of config struct * namespaceLevel: 在key之前拼接n级namespace,0等同于完整路径
func InitETCD ¶
func InitETCD(addr string)
InitETCD 初始化etcd client,namespace * addr: username:password@addr1,addr2/namespace
func SetNamespace ¶
func SetNamespace(path string)
func WithCustomWatch ¶
func WithCustomWatch(key string, fs ...func())
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.