Versions in this module Expand all Collapse all v0 v0.1.0 Sep 3, 2019 Changes in this version + type Bool struct + func (s *Bool) Get() bool + func (s *Bool) Watch(watch BoolWatch) + type BoolWatch func(str *Bool, oldValue bool) + type CommandLine struct + Prefix string + Source []string + func (p *CommandLine) Read(_ context.Context, key string) ([]byte, error) + type Distconf struct + Hooks Hooks + Readers []Reader + RefreshTimeout time.Duration + func (c *Distconf) Bool(ctx context.Context, key string, defaultVal bool) *Bool + func (c *Distconf) Duration(ctx context.Context, key string, defaultVal time.Duration) *Duration + func (c *Distconf) Float(ctx context.Context, key string, defaultVal float64) *Float + func (c *Distconf) Info() expvar.Var + func (c *Distconf) Int(ctx context.Context, key string, defaultVal int64) *Int + func (c *Distconf) Refresh(ctx context.Context, key string) + func (c *Distconf) Shutdown(ctx context.Context) error + func (c *Distconf) Str(ctx context.Context, 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 Environment struct + func (p *Environment) Read(_ context.Context, key string) ([]byte, error) + type Float struct + func (c *Float) Get() float64 + func (c *Float) Watch(watch FloatWatch) + type FloatWatch func(float *Float, oldValue float64) + type Hooks struct + OnError func(msg string, distconfKey string, err error) + type Int struct + func (c *Int) Get() int64 + func (c *Int) Watch(watch IntWatch) + type IntWatch func(str *Int, oldValue int64) + type Mem struct + func (m *Mem) Read(_ context.Context, key string) ([]byte, error) + func (m *Mem) Watch(_ context.Context, key string, callback func()) error + func (m *Mem) Write(_ context.Context, key string, value []byte) error + type Reader interface + Read func(ctx context.Context, key string) ([]byte, error) + type Shutdownable interface + Shutdown func(ctx context.Context) error + type Str struct + func (s *Str) Get() string + func (s *Str) Watch(watch StrWatch) + type StrWatch func(str *Str, oldValue string) + type Watcher interface + Watch func(ctx context.Context, key string, callback func()) error