Documentation
¶
Index ¶
- func GetNameSpaceContent(namespace, defaultValue string) string
- func GetStringValue(key, defaultValue string) string
- func GetStringValueWithNameSapce(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) GetNameSpaceContent(namespace, defaultValue string) string
- func (c *Client) GetStringValue(key, defaultValue string) string
- func (c *Client) GetStringValueWithNameSapce(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 GetNameSpaceContent ¶ added in v1.1.3
GetNameSpaceContent get contents of namespace
func GetStringValue ¶
GetStringValue from default namespace
func GetStringValueWithNameSapce ¶
GetStringValueWithNameSapce 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) GetNameSpaceContent ¶ added in v1.1.3
GetNameSpaceContent get contents of namespace
func (*Client) GetStringValue ¶
GetStringValue from default namespace
func (*Client) GetStringValueWithNameSapce ¶
GetStringValueWithNameSapce 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.