Documentation ¶
Index ¶
- Variables
- func WatchLoop(rch clientv3.WatchChan, cb WatchCallback, wg *sync.WaitGroup)
- type SimpleClient
- func (sc *SimpleClient) Compact(rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)
- func (sc *SimpleClient) Delete(key string) (int64, error)
- func (sc *SimpleClient) DeleteWithPrefix(prefix string) (int64, error)
- func (sc *SimpleClient) Get(key string) ([]byte, error)
- func (sc *SimpleClient) GetString(key string) (string, error)
- func (sc *SimpleClient) GetStrings(prefix string) (map[string]string, error)
- func (sc *SimpleClient) GrantLease(timeout int64) (clientv3.LeaseID, error)
- func (sc *SimpleClient) Init(endpoint string) (err error)
- func (sc *SimpleClient) KeepAliveLease(leaseID clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)
- func (sc *SimpleClient) Put(key string, value string) error
- func (sc *SimpleClient) PutWithLease(key string, value string, leaseID clientv3.LeaseID) error
- func (sc *SimpleClient) Watch(key string) clientv3.WatchChan
- func (sc *SimpleClient) WatchWithPrefix(prefix string) clientv3.WatchChan
- type WatchCallback
Constants ¶
This section is empty.
Variables ¶
View Source
var SC = NewSimpleClient()
Functions ¶
Types ¶
type SimpleClient ¶
func NewSimpleClient ¶
func NewSimpleClient() *SimpleClient
func (*SimpleClient) Compact ¶
func (sc *SimpleClient) Compact(rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)
func (*SimpleClient) DeleteWithPrefix ¶
func (sc *SimpleClient) DeleteWithPrefix(prefix string) (int64, 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) PutWithLease ¶
func (*SimpleClient) WatchWithPrefix ¶
func (sc *SimpleClient) WatchWithPrefix(prefix string) clientv3.WatchChan
type WatchCallback ¶
Click to show internal directories.
Click to hide internal directories.