zk

package
v0.0.0-...-625d4c4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseConn

func CloseConn(conn *zk.Conn)

CloseConn closes the global zookeeper connection

func CreateIfNotExists

func CreateIfNotExists(conn *zk.Conn, path string) error

CreateIfNotExists creates ZNode if it does not Exist.

func CreateIfNotExistsOrDie

func CreateIfNotExistsOrDie(conn *zk.Conn, path string)

CreateIfNotExistsOrDie creates ZNode if it does not Exist or dies.

func EstablishConn

func EstablishConn(zkEndpoints []string) *zk.Conn

EstablishConn establishes a global zookeeper connection

func SafeCreate

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

SafeCreate creates ZNode.

func SafeCreateOrDie

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

SafeCreateOrDie creates ZNode or dies.

func SafeCreateOrSet

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

SafeCreateOrSet creates ZNode or sets ZNode.

func SafeDelete

func SafeDelete(conn *zk.Conn, path string, version int32) error

SafeDelete deletes ZNode.

func SafeDeleteOrDie

func SafeDeleteOrDie(conn *zk.Conn, path string, version int32) error

SafeDeleteOrDie deletes ZNode or does dies.

func SafeGet

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

SafeGet gets ZNode.

func SafeGetChildren

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

SafeGetChildren lists all children attched to the ZNode.

func SafeSet

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

SafeSet sets ZNode.

func SafeSetOrDie

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

SafeSetOrDie sets ZNode or dies.

Types

This section is empty.

Jump to

Keyboard shortcuts

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