Documentation ¶
Index ¶
- Variables
- func AddAcmConfig(runTime string, ccConfig constant.ClientConfig) error
- func AddLocalConfig(runTime string, configs string)
- func AddLocalConfigFile(runTime string, filePath string)
- func AddNacosConfig(runTime string, ccConfig constant.ClientConfig, ...) error
- func CallBackFunc(group, dataId string, callbark func(namespace, group, dataId, data string)) error
- func GetConfig(group string, dataIds string) string
- func NewLocalNacos(configs string) config_client.IConfigClient
- func NewLocalNacosFile(filepath string) config_client.IConfigClient
- func SetRunTime(runtime string)
- type LocalNacos
- type ViperToml
- func (vt *ViperToml) GetConfig() (string, error)
- func (vt *ViperToml) NacosToViper()
- func (vt *ViperToml) SetCallBackFunc(group, dataId string, callbark func(namespace, group, dataId, data string))
- func (vt *ViperToml) SetDataIds(group string, dataIds ...string)
- func (vt *ViperToml) SetviperBase(configs string)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddAcmConfig ¶
func AddAcmConfig(runTime string, ccConfig constant.ClientConfig) error
注入ACM配置文件
func AddNacosConfig ¶
func AddNacosConfig(runTime string, ccConfig constant.ClientConfig, csConfigs []constant.ServerConfig) error
注入Nacos配置文件
func CallBackFunc ¶
配置回调方法
func NewLocalNacos ¶
func NewLocalNacos(configs string) config_client.IConfigClient
func NewLocalNacosFile ¶
func NewLocalNacosFile(filepath string) config_client.IConfigClient
Types ¶
type LocalNacos ¶
type LocalNacos struct { FilePath string config_client.IConfigClient // contains filtered or unexported fields }
func (*LocalNacos) DeleteConfig ¶
func (l *LocalNacos) DeleteConfig(param vo.ConfigParam) (bool, error)
删除配置
func (*LocalNacos) GetConfig ¶
func (l *LocalNacos) GetConfig(param vo.ConfigParam) (string, error)
获取配置
func (*LocalNacos) ListenConfig ¶
func (l *LocalNacos) ListenConfig(params vo.ConfigParam) (err error)
监听配置
func (*LocalNacos) PublishConfig ¶
func (l *LocalNacos) PublishConfig(param vo.ConfigParam) (bool, error)
发布配置
type ViperToml ¶
type ViperToml struct {
// contains filtered or unexported fields
}
func (*ViperToml) NacosToViper ¶
func (vt *ViperToml) NacosToViper()
func (*ViperToml) SetCallBackFunc ¶
func (vt *ViperToml) SetCallBackFunc(group, dataId string, callbark func(namespace, group, dataId, data string))
配置回调方法
func (*ViperToml) SetDataIds ¶
设置需要读取哪些配置
func (*ViperToml) SetviperBase ¶
Click to show internal directories.
Click to hide internal directories.