etcd

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: MIT Imports: 6 Imported by: 0

README

go-etcd

go-etcd

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWatchExist = errors.New("watch exist")

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(conf *Conf) (*Client, error)

func (*Client) CleanAllWatch

func (w *Client) CleanAllWatch()

func (*Client) Close

func (client *Client) Close() error

func (*Client) Del

func (reg *Client) Del(key string) error

func (*Client) Get

func (w *Client) Get(prefix string, get func(key, value string)) error

func (*Client) Put

func (reg *Client) Put(key, val string) error

func (*Client) PutWithLease

func (reg *Client) PutWithLease(key, val string) error

func (*Client) SetLease

func (reg *Client) SetLease() error

func (*Client) UnWatch

func (w *Client) UnWatch(prefix string)

func (*Client) Watch

func (w *Client) Watch(prefix string, put func(string, string), del func(string)) error

type Conf

type Conf struct {
	Addr          []string
	DialTimeout   int
	LeaseGrantTTL int64
}

Jump to

Keyboard shortcuts

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