Documentation ¶
Index ¶
- Variables
- type Kv
- func (k *Kv) Get(ctx context.Context, key string) ([]byte, error)
- func (k *Kv) GetNoCache(ctx context.Context, key string) ([]byte, error)
- func (k *Kv) GetString(ctx context.Context, key string) (string, error)
- func (k *Kv) Handle(event *clientv3.Event)
- func (k *Kv) Len() int
- func (k *Kv) OnKeyChange(key string, hook func([]byte) error) bool
- func (k *Kv) Prefix() string
- func (k *Kv) Preload(ctx context.Context) error
- func (k *Kv) SetLogger(logger contract.Logger) *Kv
- func (k *Kv) UnsafeGet(ctx context.Context, key string) ([]byte, error)
- type Observer
- type Watcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type Kv ¶
type Kv struct {
// contains filtered or unexported fields
}
func (*Kv) GetNoCache ¶
GetNoCache gets the value of the key without using the cache.
func (*Kv) OnKeyChange ¶
OnKeyChange registers a hook function to be called when the key changes. the key removed from etcd will not trigger the hook.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶
func (*Watcher) HasObserver ¶
HasObserver not goroutine safe
func (*Watcher) SetCommonPrefixMinLen ¶
Click to show internal directories.
Click to hide internal directories.