Documentation ¶
Index ¶
- Variables
- func ParseNacosAddrs(addrs []string) ([]constant.ServerConfig, error)
- type ConfigSource
- func NewConsulSource(addr string, group, key string, lg log.Logger) (ConfigSource, error)
- func NewEtcdSource(addrs []string, group, key string, lg log.Logger) (ConfigSource, error)
- func NewFileSource(key string, lg log.Logger) (ConfigSource, error)
- func NewNacosSource(addrs []string, namespace, group, key string, lg log.Logger) (ConfigSource, error)
- type ConfigSourceType
- type Event
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NacosTimeout uint64 = 5000 NacosLogDir = "/tmp/nacos/log" NacosCacheDir = "/tmp/nacos/cache" NacosLogLevel = "debug" )
Functions ¶
func ParseNacosAddrs ¶
func ParseNacosAddrs(addrs []string) ([]constant.ServerConfig, error)
Types ¶
type ConfigSource ¶
ConfigSource is the underlying config source for kconfig, responsible for reading config data and watching changes.
func NewConsulSource ¶
func NewEtcdSource ¶
func NewFileSource ¶
func NewFileSource(key string, lg log.Logger) (ConfigSource, error)
func NewNacosSource ¶
type ConfigSourceType ¶
type ConfigSourceType string
ConfigSourceType specifies config sources that kconfig currently supports.
const ( File ConfigSourceType = "file" // file can be json, yaml Etcd ConfigSourceType = "etcd" // etcd v3 Consul ConfigSourceType = "consul" Nacos ConfigSourceType = "nacos" )
Click to show internal directories.
Click to hide internal directories.