Documentation ¶
Index ¶
- Constants
- func Debugf(format string, v ...interface{})
- func Errorf(format string, v ...interface{})
- func Infof(format string, v ...interface{})
- func NewApolloSource(remoteInfo *archaius.RemoteInfo) (source.ConfigSource, error)
- type Source
- func (as *Source) AddDimensionInfo(labels map[string]string) error
- func (as *Source) Cleanup() error
- func (as *Source) Delete(key string) error
- func (as *Source) GetConfigurationByKey(key string) (interface{}, error)
- func (as *Source) GetConfigurations() (map[string]interface{}, error)
- func (as *Source) GetPriority() int
- func (as *Source) GetSourceName() string
- func (as *Source) Set(key string, value interface{}) error
- func (as *Source) SetPriority(priority int)
- func (as *Source) UpdateCallback(apolloEvent *apollo.ChangeEvent) error
- func (as *Source) Watch(callBack source.EventHandler) error
Constants ¶
View Source
const ( // AppID app id const AppID = "app_id" // NamespaceList namespace list const NamespaceList = "namespace_list" // Cluster cluster const Cluster = "cluster" // ignore namespace IgnoreNameSpace = "ignoreNameSpace" Ignore = "true" )
Variables ¶
This section is empty.
Functions ¶
func NewApolloSource ¶
func NewApolloSource(remoteInfo *archaius.RemoteInfo) (source.ConfigSource, error)
NewApolloSource get a apollo source singleton, and pull configs at once after init apollo client.
Types ¶
type Source ¶
Source apollo source
func (*Source) AddDimensionInfo ¶
AddDimensionInfo no use
func (*Source) GetConfigurationByKey ¶
GetConfigurationByKey get config by key, key's format is: {namespace}.field1.field2
func (*Source) GetConfigurations ¶
GetConfigurations get config cache map from apollo client.
func (*Source) GetSourceName ¶
GetSourceName get source name
func (*Source) UpdateCallback ¶
func (as *Source) UpdateCallback(apolloEvent *apollo.ChangeEvent) error
UpdateCallback callback function when config updates
Click to show internal directories.
Click to hide internal directories.