Documentation ¶
Index ¶
- Variables
- func Delete(path string) error
- func Init(opts ...Option) error
- func Put(path string, value any) error
- func SetOptions(opts ...Option) error
- func StopWatch(path ...string)
- func Watch(path string, handler func(*Result)) error
- type Config
- func (c *Config) CheckWatcher(path string) error
- func (c *Config) Delete(path string) error
- func (c *Config) Get(keys ...string) (ret *Result)
- func (c *Config) Init() error
- func (c *Config) Put(path string, value any) error
- func (c *Config) StopWatch(path ...string)
- func (c *Config) Watch(path string, handler func(*Result)) error
- type Logger
- type Option
- type Result
- func (r *Result) Bool(defaultValue ...bool) bool
- func (r *Result) Bytes(defaultValue ...[]byte) []byte
- func (r *Result) Err() error
- func (r *Result) Float(defaultValue ...float64) float64
- func (r *Result) Get(path string) *Result
- func (r *Result) Int(defaultValue ...int64) int64
- func (r *Result) Key() string
- func (r *Result) Scan(x any) error
- func (r *Result) String(defaultValue ...string) string
- func (r *Result) Time(defaultValue ...time.Time) time.Time
- func (r *Result) Uint(defaultValue ...uint64) uint64
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyWatch = errors.New("watch path already exist") ErrKeyNotFound = errors.New("key not found") )
Error defined
Functions ¶
Types ¶
type Logger ¶ added in v1.2.0
type Logger interface { Info(msg string, args ...any) Warn(msg string, args ...any) Error(msg string, args ...any) }
Logger ...
Click to show internal directories.
Click to hide internal directories.