Documentation ¶
Index ¶
- func GetAllKeys(namespace string) []string
- func GetNameSpaceContent(namespace, defaultValue string) string
- func GetStringValue(key, defaultValue string) string
- func GetStringValueWithNameSpace(namespace, key, defaultValue string) string
- func Start() error
- func StartWithConf(conf *Conf) error
- func StartWithConfFile(name string) error
- func Stop() error
- func WatchUpdate() <-chan *ChangeEvent
- type Change
- type ChangeEvent
- type ChangeType
- type Client
- func (c *Client) GetAllKeys(namespace string) []string
- func (c *Client) GetNameSpaceContent(namespace, defaultValue string) string
- func (c *Client) GetStringValue(key, defaultValue string) string
- func (c *Client) GetStringValueWithNameSpace(namespace, key, defaultValue string) string
- func (c *Client) Start() error
- func (c *Client) Stop() error
- func (c *Client) WatchUpdate() <-chan *ChangeEvent
- type Conf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllKeys ¶
GetAllKeys return all config keys in given namespace
func GetNameSpaceContent ¶ added in v1.1.3
GetNameSpaceContent get contents of namespace
func GetStringValue ¶
GetStringValue from default namespace
func GetStringValueWithNameSpace ¶
GetStringValueWithNameSpace get value from given namespace
func StartWithConfFile ¶
StartWithConfFile run agollo with conf file
Types ¶
type Change ¶
type Change struct { OldValue string NewValue string ChangeType ChangeType }
Change represent a single key change
type ChangeEvent ¶
ChangeEvent change event
type ChangeType ¶
type ChangeType int
ChangeType for a key
const ( // ADD a new value ADD ChangeType = iota // MODIFY a old value MODIFY // DELETE ... DELETE )
func (ChangeType) String ¶
func (c ChangeType) String() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for apollo
func (*Client) GetAllKeys ¶
GetAllKeys return all config keys in given namespace
func (*Client) GetNameSpaceContent ¶ added in v1.1.3
GetNameSpaceContent get contents of namespace
func (*Client) GetStringValue ¶
GetStringValue from default namespace
func (*Client) GetStringValueWithNameSpace ¶
GetStringValueWithNameSpace get value from given namespace
func (*Client) WatchUpdate ¶
func (c *Client) WatchUpdate() <-chan *ChangeEvent
WatchUpdate get all updates
Source Files ¶
Click to show internal directories.
Click to hide internal directories.