Documentation ¶
Index ¶
- func SetBackupFileHandler(file file.FileHandler)
- func SetCache(cacheFactory agcache.CacheFactory)
- func SetLoadBalance(loadBalance cluster.LoadBalance)
- func SetLogger(loggerInterface log.LoggerInterface)
- func SetSignature(auth auth.HTTPAuth)
- type Client
- func (c *Client) AddChangeListener(listener storage.ChangeListener)
- func (c *Client) GetApolloConfigCache() agcache.CacheInterface
- func (c *Client) GetBoolValue(key string, defaultValue bool) bool
- func (c *Client) GetChangeListeners() *list.List
- func (c *Client) GetConfig(namespace string) *storage.Config
- func (c *Client) GetConfigAndInit(namespace string) *storage.Config
- func (c *Client) GetConfigCache(namespace string) agcache.CacheInterface
- func (c *Client) GetDefaultConfigCache() agcache.CacheInterface
- func (c *Client) GetFloatValue(key string, defaultValue float64) float64
- func (c *Client) GetIntSliceValue(key string, defaultValue []int) []int
- func (c *Client) GetIntValue(key string, defaultValue int) int
- func (c *Client) GetStringSliceValue(key string, defaultValue []string) []string
- func (c *Client) GetStringValue(key string, defaultValue string) string
- func (c *Client) GetValue(key string) string
- func (c *Client) RemoveChangeListener(listener storage.ChangeListener)
- func (c *Client) UseEventDispatch()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetBackupFileHandler ¶
func SetBackupFileHandler(file file.FileHandler)
SetBackupFileHandler 设置自定义备份文件处理组件
func SetLoadBalance ¶
func SetLoadBalance(loadBalance cluster.LoadBalance)
SetLoadBalance 设置自定义负载均衡组件
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client apollo 客户端实例
func StartWithConfig ¶
StartWithConfig 根据配置启动
func (*Client) AddChangeListener ¶
func (c *Client) AddChangeListener(listener storage.ChangeListener)
AddChangeListener 增加变更监控
func (*Client) GetApolloConfigCache ¶
func (c *Client) GetApolloConfigCache() agcache.CacheInterface
GetApolloConfigCache 获取默认namespace的apollo配置
func (*Client) GetBoolValue ¶
GetBoolValue 获取bool 配置值
func (*Client) GetChangeListeners ¶
GetChangeListeners 获取配置修改监听器列表
func (*Client) GetConfigAndInit ¶
GetConfigAndInit 根据namespace获取apollo配置
func (*Client) GetConfigCache ¶
func (c *Client) GetConfigCache(namespace string) agcache.CacheInterface
GetConfigCache 根据namespace获取apollo配置的缓存
func (*Client) GetDefaultConfigCache ¶
func (c *Client) GetDefaultConfigCache() agcache.CacheInterface
GetDefaultConfigCache 获取默认缓存
func (*Client) GetFloatValue ¶
GetFloatValue 获取float配置值
func (*Client) GetIntSliceValue ¶
GetIntSliceValue 获取[]int 配置值
func (*Client) GetIntValue ¶
GetIntValue 获取int配置值
func (*Client) GetStringSliceValue ¶
GetStringSliceValue 获取[]string 配置值
func (*Client) GetStringValue ¶
GetStringValue 获取string配置值
func (*Client) RemoveChangeListener ¶
func (c *Client) RemoveChangeListener(listener storage.ChangeListener)
RemoveChangeListener 增加变更监控
func (*Client) UseEventDispatch ¶
func (c *Client) UseEventDispatch()
UseEventDispatch 添加为某些key分发event功能
Click to show internal directories.
Click to hide internal directories.