Documentation ¶
Index ¶
- func GetApolloConfigCache() *freecache.Cache
- func GetBoolValue(key string, defaultValue bool) bool
- func GetFloatValue(key string, defaultValue float64) float64
- func GetIntValue(key string, defaultValue int) int
- func GetStringValue(key string, defaultValue string) string
- func ListenChangeEvent() <-chan *ChangeEvent
- func Start()
- func StartRefreshConfig(component AbsComponent)
- func StartWithLogger(loggerInterface LoggerInterface)
- func SyncConfig() error
- type AbsComponent
- type ApolloConfig
- type ApolloConnConfig
- type AppConfig
- type AutoRefreshConfigComponent
- type CallBack
- type ChangeEvent
- type ConfigChange
- type ConfigChangeType
- type ConnectConfig
- type LoggerInterface
- type NotifyConfigComponent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenChangeEvent ¶ added in v1.3.0
func ListenChangeEvent() <-chan *ChangeEvent
list config change event
func StartRefreshConfig ¶
func StartRefreshConfig(component AbsComponent)
func StartWithLogger ¶ added in v1.1.0
func StartWithLogger(loggerInterface LoggerInterface)
Types ¶
type AbsComponent ¶
type AbsComponent interface {
Start()
}
type ApolloConfig ¶
type ApolloConfig struct { ApolloConnConfig Configurations map[string]string `json:"configurations"` }
type ApolloConnConfig ¶ added in v0.0.7
type ApolloConnConfig struct { AppId string `json:"appId"` Cluster string `json:"cluster"` NamespaceName string `json:"namespaceName"` ReleaseKey string `json:"releaseKey"` sync.RWMutex }
func GetCurrentApolloConfig ¶
func GetCurrentApolloConfig() *ApolloConnConfig
type AppConfig ¶
type AutoRefreshConfigComponent ¶
type AutoRefreshConfigComponent struct { }
func (*AutoRefreshConfigComponent) Start ¶
func (this *AutoRefreshConfigComponent) Start()
type CallBack ¶ added in v1.0.2
type ChangeEvent ¶ added in v1.3.0
type ChangeEvent struct { Namespace string Changes map[string]*ConfigChange }
config change event
type ConfigChange ¶ added in v1.3.0
type ConfigChange struct { OldValue string NewValue string ChangeType ConfigChangeType }
type ConfigChangeType ¶ added in v1.3.0
type ConfigChangeType int
config change type
const ( ADDED ConfigChangeType = iota MODIFIED DELETED )
type ConnectConfig ¶ added in v1.0.2
type LoggerInterface ¶ added in v1.1.0
type LoggerInterface interface { Debugf(format string, params ...interface{}) Infof(format string, params ...interface{}) Warnf(format string, params ...interface{}) error Errorf(format string, params ...interface{}) error Debug(v ...interface{}) Info(v ...interface{}) Warn(v ...interface{}) error Error(v ...interface{}) error }
type NotifyConfigComponent ¶
type NotifyConfigComponent struct { }
func (*NotifyConfigComponent) Start ¶
func (this *NotifyConfigComponent) Start()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.