Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAddrIsEmpty = errors.New("config center addr is empty") ErrContentIsEmpty = errors.New("config content is empty") )
Functions ¶
This section is empty.
Types ¶
type ConsulConfig ¶
type ConsulConfig struct { Client *api.Client Addr string `json:"addr"` Namespace string `json:"namespace"` ServiceId string `json:"serviceId"` }
func (*ConsulConfig) LoadConsulConfig ¶
func (c *ConsulConfig) LoadConsulConfig(conf interface{}) (err error)
LoadConsulConfig 引导 consul 配置数据给 conf
type FileConfig ¶
type FileConfig struct {
Path string `json:"path"`
}
func (*FileConfig) LoadFileConfig ¶
func (c *FileConfig) LoadFileConfig(conf interface{}) (err error)
LoadFileConfig 引导 file 配置数据给 conf
type NacosConfig ¶
type NacosConfig struct { Client config_client.IConfigClient Addr string `json:"addr"` Namespace string `json:"namespace"` DataId string `json:"dataId"` Group string `json:"group"` }
func (*NacosConfig) CancelListenConfig ¶
func (c *NacosConfig) CancelListenConfig() (err error)
CancelListenConfig 取消配置监听
func (*NacosConfig) ListenConfig ¶
func (c *NacosConfig) ListenConfig(conf interface{})
ListenConfig 配置监听
func (*NacosConfig) LoadNacosConfig ¶
func (c *NacosConfig) LoadNacosConfig(conf interface{}) (err error)
LoadNacosConfig 引导 nacos 配置数据给 conf
Click to show internal directories.
Click to hide internal directories.