zookeeper

package
v0.0.0-...-82cd86b Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoChild      = errors.New("zk: children is nil")
	ErrNodeNotExist = errors.New("zk: node not exist")
)

Functions

func Connect

func Connect(addr []string, timeout time.Duration) (*zk.Conn, error)

连接到zookeeper

func Create

func Create(conn *zk.Conn, fpath string) error

func GetNodeData

func GetNodeData(conn *zk.Conn, path string) ([]byte, error)

func GetNodesW

func GetNodesW(conn *zk.Conn, path string) ([]string, <-chan zk.Event, error)

创建节点,并返回watch

func RegisterTempNode

func RegisterTempNode(conn *zk.Conn, fpath string, data []byte) error

注册一个临时znode

func SetNodeData

func SetNodeData(conn *zk.Conn, path string, data []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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