Versions in this module Expand all Collapse all v1 v1.9.0 Oct 8, 2019 Changes in this version + const FILE + 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 InitCustomConfig(loadAppConfig func() (*AppConfig, error)) + func ListenChangeEvent() <-chan *ChangeEvent + func SetCache(cacheInterface CacheInterface) + func SetLogger(loggerInterface LoggerInterface) + func Start() error + func StartRefreshConfig(component AbsComponent) + func StartWithCache(cacheInterface CacheInterface) error + func StartWithLogger(loggerInterface LoggerInterface) error + type AbsComponent interface + Start func() + type ApolloConfig struct + Configurations map[string]string + type ApolloConnConfig struct + AppId string + Cluster string + NamespaceName string + ReleaseKey string + func GetCurrentApolloConfig() *ApolloConnConfig + type AppConfig struct + AppId string + BackupConfigPath string + Cluster string + Ip string + NamespaceName string + NextTryConnTime int64 + func GetAppConfig(newAppConfig *AppConfig) *AppConfig + type CacheInterface interface + Clear func() + Del func(key []byte) (affected bool) + EntryCount func() (entryCount int64) + Get func(key []byte) (value []byte, err error) + NewIterator func() *freecache.Iterator + Set func(key, value []byte, expireSeconds int) (err error) + TTL func(key []byte) (timeLeft uint32, err error) + func GetApolloConfigCache() CacheInterface + type CallBack struct + NotModifyCallBack func() error + SuccessCallBack func([]byte) (interface{}, error) + type ChangeEvent struct + Changes map[string]*ConfigChange + Namespace string + type ConfigChange struct + ChangeType ConfigChangeType + NewValue string + OldValue string + type ConfigChangeType int + const ADDED + const DELETED + const MODIFIED + type ConnectConfig struct + Timeout time.Duration + Uri string + type DefaultLogger struct + func (this *DefaultLogger) Debug(v ...interface{}) + func (this *DefaultLogger) Debugf(format string, params ...interface{}) + func (this *DefaultLogger) Error(v ...interface{}) error + func (this *DefaultLogger) Errorf(format string, params ...interface{}) error + func (this *DefaultLogger) Info(v ...interface{}) + func (this *DefaultLogger) Infof(format string, params ...interface{}) + func (this *DefaultLogger) Warn(v ...interface{}) error + func (this *DefaultLogger) Warnf(format string, params ...interface{}) error + type LoggerInterface interface + Debug func(v ...interface{}) + Debugf func(format string, params ...interface{}) + Error func(v ...interface{}) error + Errorf func(format string, params ...interface{}) error + Info func(v ...interface{}) + Infof func(format string, params ...interface{}) + Warn func(v ...interface{}) error + Warnf func(format string, params ...interface{}) error + type NotifyConfigComponent struct + func (this *NotifyConfigComponent) Start()