etcd

package
v0.0.0-...-c415e3a Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_TTL = 365 * 24 * 60 * 60 * time.Second

Variables

View Source
var (
	ErrNotDir   = errors.New("etcd: not a dir")
	ErrNotFile  = errors.New("etcd: not a file")
	ErrNotExist = errors.New("etcd: not exist")
)
View Source
var ErrClosedClient = errors.New("use of closed etcd client")

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(addrlist string, auth string, timeout time.Duration) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Create

func (c *Client) Create(path string, data []byte) error

func (*Client) CreateInOrder

func (c *Client) CreateInOrder(path string, data []byte) (string, error)

assume this is only used by cli, and cli operation is locked. So just not support concurrency create.

func (*Client) Delete

func (c *Client) Delete(path string) error

func (*Client) List

func (c *Client) List(path string, must bool) ([]string, error)

func (*Client) Mkdir

func (c *Client) Mkdir(path string) error

func (*Client) Read

func (c *Client) Read(path string, must bool) ([]byte, error)

func (*Client) Update

func (c *Client) Update(path string, data []byte) error

func (*Client) WatchInOrder

func (c *Client) WatchInOrder(path string) (<-chan clientlocal.Event, []string, error)

Jump to

Keyboard shortcuts

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