Versions in this module Expand all Collapse all v1 v1.0.0 Mar 17, 2017 Changes in this version + var DefaultLogger = log.Logger(log.DefaultLogger.CreateChild()) + var DefaultZkConfig = &ZkConfig + type BackingLoader interface + Get func() (Reader, error) + func CmdLoader(prefix string) BackingLoader + func EnvLoader() BackingLoader + func IniLoader(filename string) BackingLoader + func MemLoader() BackingLoader + type BackingLoaderFunc func() (Reader, error) + func (f BackingLoaderFunc) Get() (Reader, error) + type Bool struct + func (s *Bool) Get() bool + func (s *Bool) Watch(watch BoolWatch) + type BoolWatch func(str *Bool, oldValue bool) + type DistInfo struct + DefaultValue interface{} + DistType DistType + File string + Line int + type DistType int + const BoolType + const DurationType + const FloatType + const IntType + const StrType + type Distconf struct + Logger log.Logger + func FromLoaders(loaders []BackingLoader) *Distconf + func New(readers []Reader) *Distconf + func (c *Distconf) Bool(key string, defaultVal bool) *Bool + func (c *Distconf) Close() + func (c *Distconf) Duration(key string, defaultVal time.Duration) *Duration + func (c *Distconf) Float(key string, defaultVal float64) *Float + func (c *Distconf) Info() expvar.Var + func (c *Distconf) Int(key string, defaultVal int64) *Int + func (c *Distconf) Str(key string, defaultVal string) *Str + func (c *Distconf) Var() expvar.Var + type Duration struct + func (s *Duration) Get() time.Duration + func (s *Duration) Watch(watch DurationWatch) + type DurationWatch func(duration *Duration, oldValue time.Duration) + type Dynamic interface + Watch func(key string, callback backingCallbackFunction) error + type Float struct + func (c *Float) Get() float64 + func (c *Float) Watch(watch FloatWatch) + type FloatWatch func(float *Float, oldValue float64) + type Int struct + func (c *Int) Get() int64 + func (c *Int) Watch(watch IntWatch) + type IntWatch func(str *Int, oldValue int64) + type Reader interface + Close func() + Get func(key string) ([]byte, error) + func Cmd(prefix string) Reader + func Env() Reader + func Ini(filename string) (Reader, error) + type ReaderWriter interface + func Mem() ReaderWriter + func Zk(zkConnector ZkConnector, conf *ZkConfig) (ReaderWriter, error) + type Str struct + func (s *Str) Get() string + func (s *Str) Watch(watch StrWatch) + type StrWatch func(str *Str, oldValue string) + type Writer interface + Write func(key string, value []byte) error + type ZkConfig struct + Logger log.Logger + type ZkConn interface + ChildrenW func(path string) ([]string, *zk.Stat, <-chan zk.Event, error) + Close func() + Create func(path string, data []byte, flags int32, acl []zk.ACL) (string, error) + Delete func(path string, version int32) error + Exists func(path string) (bool, *zk.Stat, error) + ExistsW func(path string) (bool, *zk.Stat, <-chan zk.Event, error) + Get func(path string) ([]byte, *zk.Stat, error) + GetW func(path string) ([]byte, *zk.Stat, <-chan zk.Event, error) + Set func(path string, data []byte, version int32) (*zk.Stat, error) + type ZkConnector interface + Connect func() (ZkConn, <-chan zk.Event, error) + type ZkConnectorFunc func() (ZkConn, <-chan zk.Event, error) + func (z ZkConnectorFunc) Connect() (ZkConn, <-chan zk.Event, error)