Documentation ¶
Index ¶
- Constants
- Variables
- func InitialiseApolloConfig(appConfig *config.AppConfig)
- func InitialiseNacosConfig(param vo.NacosClientParam, dataId, format, group string)
- func LoadFromApollo(appConfig *config.AppConfig)
- func LoadFromNacos(param vo.NacosClientParam, dataId, format, group string) error
- type BaseApolloListener
- type NacosChangeEvent
- type NacosConfigListenerParam
- type NacosConfigMgr
Constants ¶
View Source
const ( DotenvConfigFormat nacosConfigType = "dotenv" YamlConfigFormat nacosConfigType = "yaml" )
Variables ¶
View Source
var ApolloClient agollo.Client
View Source
var NewConfigClient = clients.NewConfigClient
View Source
var StartWithConfig = agollo.StartWithConfig
Functions ¶
func InitialiseApolloConfig ¶
func InitialiseNacosConfig ¶
func InitialiseNacosConfig(param vo.NacosClientParam, dataId, format, group string)
func LoadFromApollo ¶
func LoadFromNacos ¶
func LoadFromNacos(param vo.NacosClientParam, dataId, format, group string) error
Types ¶
type BaseApolloListener ¶
func (*BaseApolloListener) OnNewestChange ¶
func (c *BaseApolloListener) OnNewestChange(event *storage.FullChangeEvent)
type NacosChangeEvent ¶
type NacosConfigListenerParam ¶
type NacosConfigListenerParam struct { DataId string OnChange func(event *NacosChangeEvent) }
type NacosConfigMgr ¶
type NacosConfigMgr struct {
// contains filtered or unexported fields
}
var NacosClient *NacosConfigMgr
func NewNacosConfigMgr ¶
func NewNacosConfigMgr(dataIds []string, group string, format nacosConfigType, namespaceId string, client config_client.IConfigClient, listeners cache.ConcurrentMap) *NacosConfigMgr
func (*NacosConfigMgr) AddChangeListener ¶
func (m *NacosConfigMgr) AddChangeListener(param NacosConfigListenerParam)
func (*NacosConfigMgr) CallbackOnChange ¶
func (m *NacosConfigMgr) CallbackOnChange(namespace, group, dataId, data, old string)
func (*NacosConfigMgr) Listeners ¶
func (m *NacosConfigMgr) Listeners() cache.ConcurrentMap
Click to show internal directories.
Click to hide internal directories.