etcd

package
v0.0.0-...-cb6d2b4 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type EtcdClient

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

func New

func New(ctx context.Context, addrStr string, timeout time.Duration) (c *EtcdClient, err error)

func (*EtcdClient) Close

func (this *EtcdClient) Close() (err error)

TODO need test

func (*EtcdClient) Create

func (this *EtcdClient) Create(path string, data string) (err error)

func (*EtcdClient) CreateEphemeral

func (this *EtcdClient) CreateEphemeral(path string, data []byte) (err error)

func (*EtcdClient) CreateEphemeralInOrder

func (this *EtcdClient) CreateEphemeralInOrder(path string, data []byte) (err error)

func (*EtcdClient) Delete

func (this *EtcdClient) Delete(path string) (err error)

func (*EtcdClient) GetLocalIp

func (this *EtcdClient) GetLocalIp() string

func (*EtcdClient) List

func (this *EtcdClient) List(path string) (paths []string, index uint64, err error)

func (*EtcdClient) Read

func (this *EtcdClient) Read(path string) (data string, index uint64, err error)

func (*EtcdClient) Update

func (this *EtcdClient) Update(path string, data []byte) (err error)

func (*EtcdClient) Watch

func (this *EtcdClient) Watch(path string, cb func() (uint64, error)) (err error)

Jump to

Keyboard shortcuts

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