zk_wrapper

package module
v0.0.0-...-60b8907 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: MIT Imports: 6 Imported by: 7

README

zk_wrapper Build Status

  • Wrapper chroot for the go-zookeeper

It's much better to support this in go-zookpper, and i try to add chroot to go-zookeeper(https://github.com/samuel/go-zookeeper/pull/158), but got no response.

  • Wrapper some helper functions, eg. Mkdir/Delete Recursive

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	*zk.Conn
	// contains filtered or unexported fields
}

func Connect

func Connect(servers []string, sessionTimeout time.Duration) (*Conn, <-chan zk.Event, error)

func ConnectWithDialer

func ConnectWithDialer(servers []string, sessionTimeout time.Duration, dialer zk.Dialer) (*Conn, <-chan zk.Event, error)

func (*Conn) AppendChroot

func (c *Conn) AppendChroot(path string) string

func (*Conn) Children

func (c *Conn) Children(path string) ([]string, *zk.Stat, error)

func (*Conn) ChildrenW

func (c *Conn) ChildrenW(path string) ([]string, *zk.Stat, *zk.Watcher, error)

func (*Conn) Chroot

func (c *Conn) Chroot(prefix string) error

func (*Conn) Create

func (c *Conn) Create(path string, data []byte, flags int32, acl []zk.ACL) (string, error)

func (*Conn) CreateProtectedEphemeralSequential

func (c *Conn) CreateProtectedEphemeralSequential(path string, data []byte, acl []zk.ACL) (string, error)

func (*Conn) Delete

func (c *Conn) Delete(path string, version int32) error

func (*Conn) DeleteRecursive

func (c *Conn) DeleteRecursive(zkPath string, version int32) error

func (*Conn) Exists

func (c *Conn) Exists(path string) (bool, *zk.Stat, error)

func (*Conn) ExistsW

func (c *Conn) ExistsW(path string) (bool, *zk.Stat, *zk.Watcher, error)

func (*Conn) Get

func (c *Conn) Get(path string) ([]byte, *zk.Stat, error)

func (*Conn) GetACL

func (c *Conn) GetACL(path string) ([]zk.ACL, *zk.Stat, error)

func (*Conn) GetW

func (c *Conn) GetW(path string) ([]byte, *zk.Stat, *zk.Watcher, error)

func (*Conn) MkNodeRecursive

func (c *Conn) MkNodeRecursive(zkPath string, flags int32, data []byte) error

func (*Conn) Multi

func (c *Conn) Multi(ops ...interface{}) ([]zk.MultiResponse, error)

func (*Conn) RemoveWatcher

func (c *Conn) RemoveWatcher(w *zk.Watcher) bool

func (*Conn) Set

func (c *Conn) Set(path string, data []byte, version int32) (*zk.Stat, error)

func (*Conn) SetACL

func (c *Conn) SetACL(path string, acl []zk.ACL, version int32) (*zk.Stat, error)

func (*Conn) Sync

func (c *Conn) Sync(path string) (string, error)

func (*Conn) TrimChroot

func (c *Conn) TrimChroot(path string) string

Jump to

Keyboard shortcuts

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