zkclient

package
v3.1.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTH_USER = "cc"
	AUTH_PWD  = "3.0#bkcc"
)

Variables

View Source
var (
	ErrNoNode        = zk.ErrNoNode
	EventNodeDeleted = zk.EventNodeDeleted
	ErrNodeExists    = zk.ErrNodeExists
)

Functions

This section is empty.

Types

type ZkClient

type ZkClient struct {
	ZkHost []string
	ZkConn *zk.Conn
	// contains filtered or unexported fields
}

func NewZkClient

func NewZkClient(host []string) *ZkClient

func (*ZkClient) AddAuth

func (z *ZkClient) AddAuth() error

func (*ZkClient) CheckMulNode

func (z *ZkClient) CheckMulNode(path string, data []byte) error

func (*ZkClient) CheckNode

func (z *ZkClient) CheckNode(path string, data []byte) error

func (*ZkClient) ChildrenW

func (z *ZkClient) ChildrenW(path string) ([]string, *zk.Stat, <-chan zk.Event, error)

func (*ZkClient) Close

func (z *ZkClient) Close()

func (*ZkClient) Connect

func (z *ZkClient) Connect() error

func (*ZkClient) ConnectEx

func (z *ZkClient) ConnectEx(sessionTimeOut time.Duration) error

func (*ZkClient) Create

func (z *ZkClient) Create(path string, data []byte) error

func (*ZkClient) CreateDeepNode

func (z *ZkClient) CreateDeepNode(path string, data []byte) error

func (*ZkClient) CreateEphAndSeq

func (z *ZkClient) CreateEphAndSeq(path string, data []byte) error

CreateEphemeral create ephemeral node

func (*ZkClient) CreateEphAndSeqEx

func (z *ZkClient) CreateEphAndSeqEx(path string, data []byte) (string, error)

func (*ZkClient) CreateNode

func (z *ZkClient) CreateNode(path string, data []byte) error

func (*ZkClient) Del

func (z *ZkClient) Del(path string, version int32) error

func (*ZkClient) Exist

func (z *ZkClient) Exist(path string) (bool, error)

func (*ZkClient) ExistEx

func (z *ZkClient) ExistEx(path string) (bool, *zk.Stat, error)

func (*ZkClient) ExistW

func (z *ZkClient) ExistW(path string) (bool, *zk.Stat, <-chan zk.Event, error)

func (*ZkClient) Get

func (z *ZkClient) Get(path string) (string, error)

func (*ZkClient) GetAll2Json

func (z *ZkClient) GetAll2Json(path string) (string, error)

func (*ZkClient) GetChildren

func (z *ZkClient) GetChildren(path string) ([]string, error)

func (*ZkClient) GetChildrenEx

func (z *ZkClient) GetChildrenEx(path string) ([]string, *zk.Stat, error)

func (*ZkClient) GetEx

func (z *ZkClient) GetEx(path string) ([]byte, *zk.Stat, error)

func (*ZkClient) GetW

func (z *ZkClient) GetW(path string) ([]byte, *zk.Stat, <-chan zk.Event, error)

func (*ZkClient) Ping

func (z *ZkClient) Ping() error

Ping to ping server

func (*ZkClient) Set

func (z *ZkClient) Set(path, data string, version int32) error

func (*ZkClient) State

func (z *ZkClient) State() zk.State

func (*ZkClient) Update

func (z *ZkClient) Update(path, data string) error

func (*ZkClient) WatchChildren

func (z *ZkClient) WatchChildren(path string) ([]string, <-chan zk.Event, error)

type ZkLock

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

func NewZkLock

func NewZkLock(host []string) *ZkLock

func (*ZkLock) Lock

func (zlock *ZkLock) Lock(path string) error

func (*ZkLock) LockEx

func (zlock *ZkLock) LockEx(path string, sessionTimeOut time.Duration) error

func (*ZkLock) UnLock

func (zlock *ZkLock) UnLock() error

Jump to

Keyboard shortcuts

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