zkclient

package
v0.0.0-...-1b79cdd Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger = func(format string, v ...interface{}) {
	log.Infof("zookeeper - " + fmt.Sprintf(format, v...))
}
View Source
var ErrClientClosed = errors.New("use a closed zookeeper client")

Functions

This section is empty.

Types

type Client

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

func New

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

func NewZkClient

func NewZkClient(zkAddr string, timeout time.Duration, logger func(foramt string, v ...interface{})) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Create

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

func (*Client) Delete

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

func (*Client) Do

func (c *Client) Do(fn func(conn *zk.Conn) error) 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

Jump to

Keyboard shortcuts

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