etcdv3

package
v0.0.0-...-bac99df Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func WatchLoop

func WatchLoop(rch clientv3.WatchChan, cb WatchCallback, wg *sync.WaitGroup)

Types

type SimpleClient

type SimpleClient struct {
	*clientv3.Client
}

func NewSimpleClient

func NewSimpleClient() *SimpleClient

func (*SimpleClient) Compact

func (sc *SimpleClient) Compact(rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)

func (*SimpleClient) Delete

func (sc *SimpleClient) Delete(key string) (int64, error)

func (*SimpleClient) DeleteWithPrefix

func (sc *SimpleClient) DeleteWithPrefix(prefix string) (int64, error)

func (*SimpleClient) Get

func (sc *SimpleClient) Get(key string) ([]byte, error)

func (*SimpleClient) GetString

func (sc *SimpleClient) GetString(key string) (string, error)

func (*SimpleClient) GetStrings

func (sc *SimpleClient) GetStrings(prefix string) (map[string]string, error)

func (*SimpleClient) GrantLease

func (sc *SimpleClient) GrantLease(timeout int64) (clientv3.LeaseID, error)

func (*SimpleClient) Init

func (sc *SimpleClient) Init(endpoint string) (err error)

func (*SimpleClient) KeepAliveLease

func (sc *SimpleClient) KeepAliveLease(leaseID clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)

func (*SimpleClient) Put

func (sc *SimpleClient) Put(key string, value string) error

func (*SimpleClient) PutWithLease

func (sc *SimpleClient) PutWithLease(key string, value string, leaseID clientv3.LeaseID) error

func (*SimpleClient) Watch

func (sc *SimpleClient) Watch(key string) clientv3.WatchChan

func (*SimpleClient) WatchWithPrefix

func (sc *SimpleClient) WatchWithPrefix(prefix string) clientv3.WatchChan

type WatchCallback

type WatchCallback func(ev *clientv3.Event)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL