Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrWatcherStopped = errors.New("watcher is stopped") ErrNotImplement = errors.New("the method is not implement") )
Functions ¶
Types ¶
type KV ¶
type KV interface { Set(ctx context.Context, key string, val []byte, opts ...Option) error Get(ctx context.Context, key string, opts ...Option) (Result, error) Del(ctx context.Context, key string, opts ...Option) error Watch(ctx context.Context, opts ...Option) Watcher Close() error String() string }
KV is the source from which config is loaded.
type KeepAliveCallback ¶ added in v0.3.12
type KeepAliveCallback func(id, ttl int64, cancel func())
type Option ¶
func FromKey ¶ added in v0.3.12
func FromKey() Option
分页查询开始key, 如果为空则从第一个开始 nextKey = $(lastKey) + "\x00", 在 etcd 中,键是按字典序排序的。通过追加 \x00,可以确保下一个键是当前键的后一个键
func KeepAlive ¶ added in v0.3.12
func KeepAlive(f KeepAliveCallback) Option
func MatchPrefix ¶ added in v0.3.12
func MatchPrefix() Option
Click to show internal directories.
Click to hide internal directories.