etcdv3

package
v0.0.0-...-83fd405 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var C = New()

Functions

func WatchLoop

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

Types

type Client

type Client struct {
	*clientv3.Client
}

func New

func New() *Client

func (*Client) Compact

func (c *Client) Compact(rev int64, opts ...clientv3.CompactOption) (*clientv3.CompactResponse, error)

func (*Client) Delete

func (c *Client) Delete(key string) (int64, error)

func (*Client) DeleteWithPrefix

func (c *Client) DeleteWithPrefix(prefix string) (int64, error)

func (*Client) Get

func (c *Client) Get(key string) ([]byte, error)

func (*Client) GetString

func (c *Client) GetString(key string) (string, error)

func (*Client) GetStrings

func (c *Client) GetStrings(prefix string) (map[string]string, error)

func (*Client) GrantLease

func (c *Client) GrantLease(timeout int64) (clientv3.LeaseID, error)

func (*Client) Init

func (c *Client) Init(endpoint string) (err error)

func (*Client) KeepAliveLease

func (c *Client) KeepAliveLease(leaseID clientv3.LeaseID) (<-chan *clientv3.LeaseKeepAliveResponse, error)

func (*Client) Put

func (c *Client) Put(key string, value string) error

func (*Client) PutWithLease

func (c *Client) PutWithLease(key string, value string, leaseID clientv3.LeaseID) error

func (*Client) Watch

func (c *Client) Watch(key string) clientv3.WatchChan

func (*Client) WatchWithPrefix

func (c *Client) 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