Versions in this module Expand all Collapse all v4 v4.1.7 Jul 3, 2024 Changes in this version + var ErrorStatusNotOK = errors.New("http resp code not ok") + func GetAllKeys(opts ...OpOption) []string + func GetContent(opts ...OpOption) string + func GetPropertiesContent(opts ...OpOption) string + func GetReleaseKey(opts ...OpOption) string + func GetString(key string, opts ...OpOption) string + func OnUpdate(handler func(*ChangeEvent)) + func Start(conf *Conf, opts ...ClientOption) error + func Stop() error + func SubscribeToNamespaces(namespaces ...string) error + type Change struct + ChangeType ChangeType + Key string + NewValue string + OldValue string + func (c *Change) String() string + type ChangeEvent struct + Changes map[string]*Change + Namespace string + func (e *ChangeEvent) String() string + type ChangeType int + const ADD + const DELETE + const MODIFY + func (c ChangeType) String() string + type Client interface + GetAllKeys func(opts ...OpOption) []string + GetContent func(opts ...OpOption) string + GetPropertiesContent func(opts ...OpOption) string + GetReleaseKey func(opts ...OpOption) string + GetString func(key string, opts ...OpOption) string + OnUpdate func(func(*ChangeEvent)) + Start func() error + Stop func() error + SubscribeToNamespaces func(namespaces ...string) error + func NewClient(conf *Conf, opts ...ClientOption) Client + type ClientOption func(*client) + func SkipLocalCache() ClientOption + func WithLogger(logger Logger) ClientOption + type Conf struct + AccesskeySecret string + AppID string + CacheDir string + Cluster string + InsecureSkipVerify bool + MetaAddr string + NameSpaceNames []string + PollTimeout int64 + Retry int + SyncTimeout int64 + func NewConf(name string) (*Conf, error) + type Logger interface + Errorf func(format string, args ...interface{}) + Infof func(format string, args ...interface{}) + type OpOption func(op *operation) + func WithNamespace(namespace string) OpOption