Versions in this module Expand all Collapse all v0 v0.0.1 Apr 8, 2023 Changes in this version + func ReaderCacheNotify(s *ReaderCache, key string, newVal []byte) + func ReaderCacheRefresh(s *ReaderCache, r Reader, OnFetchErr func(err error, key string)) + type Bool struct + func (s *Bool) Get() bool + func (s *Bool) MarshalJSON() ([]byte, error) + func (w *Bool) Watch(watch func()) + type CachedReader struct + Fallback DynamicReader + func (m *CachedReader) Close() + func (m *CachedReader) Get(key string) ([]byte, error) + func (m *CachedReader) ListConfig() map[string][]byte + func (m *CachedReader) ReadFrom(r io.Reader) (n int64, err error) + func (m *CachedReader) StoreConfig(toStore map[string][]byte) + func (m *CachedReader) Watch(key string, callback func(string)) error + func (m *CachedReader) WriteTo(w io.Writer) (int64, error) + type ComboRefresher []Refreshable + func (c ComboRefresher) Refresh() + type CommandLine struct + Prefix string + Source []string + func (p *CommandLine) Close() + func (p *CommandLine) Get(key string) ([]byte, error) + type Distconf struct + Logger Logger + Readers []Reader + 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) Int(key string, defaultVal int64) *Int + func (c *Distconf) Keys() []string + func (c *Distconf) Str(key string, defaultVal string) *Str + func (c *Distconf) Struct(key string, defaultVal interface{}) *Struct + func (c *Distconf) Var() expvar.Var + type Duration struct + func (s *Duration) Get() time.Duration + func (s *Duration) MarshalJSON() ([]byte, error) + func (w *Duration) Watch(watch func()) + type Dynamic interface + Watch func(key string, callback func(string)) error + type DynamicReader interface + type Env struct + OsGetenv func(string) string + Prefix string + func (p *Env) Close() + func (p *Env) Get(key string) ([]byte, error) + type Float struct + func (c *Float) Get() float64 + func (c *Float) MarshalJSON() ([]byte, error) + func (w *Float) Watch(watch func()) + type InMemory struct + func (m *InMemory) Close() + func (m *InMemory) Get(key string) ([]byte, error) + func (m *InMemory) ListConfig() map[string][]byte + func (m *InMemory) StoreConfig(toStore map[string][]byte) + func (m *InMemory) Watch(key string, callback func(string)) error + func (m *InMemory) Write(key string, value []byte) error + type Int struct + func (c *Int) Get() int64 + func (c *Int) MarshalJSON() ([]byte, error) + func (w *Int) Watch(watch func()) + type JSONConfig struct + func (j *JSONConfig) Close() + func (j *JSONConfig) Get(key string) ([]byte, error) + func (j *JSONConfig) Refresh(input io.Reader) error + func (j *JSONConfig) RefreshFile(filename string) error + func (j *JSONConfig) Watch(key string, callback func(string)) error + type Logger func(key string, err error, msg string) + type Reader interface + Close func() + Get func(key string) ([]byte, error) + type ReaderCache struct + func (s *ReaderCache) Watch(key string, callback func(string)) error + func (s *ReaderCache) WatchedKeys() []string + type ReaderWriter interface + type Refreshable interface + Refresh func() + type Refresher struct + ToRefresh Refreshable + WaitTime *Duration + func (r *Refresher) Close() error + func (r *Refresher) Done() <-chan struct{} + func (r *Refresher) Setup() error + func (r *Refresher) Start() error + type Str struct + func (s *Str) Get() string + func (s *Str) MarshalJSON() ([]byte, error) + func (w *Str) Watch(watch func()) + type Struct struct + func (s *Struct) Get() interface{} + func (s *Struct) MarshalJSON() ([]byte, error) + func (w *Struct) Watch(watch func()) + type Writer interface + Write func(key string, value []byte) error