package
2.1.0-alpha.1+incompatible
Repository: https://github.com/gitql/vitess.git
Documentation: pkg.go.dev

# Packages

Package fakezk is a pretty complete mock implementation of a Zookeper connection (see go/zk/zk.Conn).
No description provided by the author

# Functions

ChildrenRecursive returns the relative path of all the children of the provided node.
CreateElection returns an initialized elector.
CreateMutex initializes an unacquired mutex.
CreateOrUpdate creates or updates a file.
CreateRecursive creates a path and any pieces required, think mkdir -p.
DeleteRecursive will delete all children of the given path.
DialZk dials a ZK server and waits for connection event.
DialZkTimeout dial the server, and wait up to timeout until connection.
GuessLocalCell reads the cell from -zk.local-cell, or the environment ZK_CLIENT_LOCAL_CELL or guess the cell by the hostname.
IsDirectory returns if this node should be treated as a directory.
NewConnCache creates a new Zookeeper connection cache.
NewMetaConn creates a MetaConn.
ObtainQueueLock waits until we hold the lock in the provided path.
ResolveWildcards resolves paths like: /zk/nyc/vt/tablets/*/action /zk/global/vt/keyspaces/*/shards/*/action /zk/*/vt/tablets/*/action into real existing paths If you send paths that don't contain any wildcard and don't exist, this function will return an empty array.
Time returns a time.Time from a ZK int64 milliseconds since Epoch time.
ZkCellFromZkPath extracts the cell name from a zkPath.
ZkKnownCells returns all the known cells, alphabetically ordered.
ZkPathToZkAddr returns the zookeeper server address to use for the given path.
ZkTime returns a ZK time (int64) from a time.Time.

# Constants

PermDirectory are default permissions for a node.
PermFile allows a zk node to emulate file behavior by disallowing child nodes.

# Variables

DefaultZkConfigPaths is the default list of config files to check.
ErrConnectionClosed is returned if we try to access a closed connection.
ErrInterrupted is returned by functions that wait for a result when they are interrupted.
ErrTimeout is returned by functions that wait for a result when the timeout value is reached.
MagicPrefix is the Default name for the root note in the zookeeper tree.

# Structs

ConnCache is a cache for Zookeeper connections which guarantees that you have at most one zookeeper connection per cell.
MetaConn is an implementation of Conn that routes to multiple cells.
ZElector stores basic state for running an election.
ZkConn is a client class that implements zk.Conn using a zookeeper.Conn.

# Interfaces

Conn is really close to the zookeeper library connection interface.
ElectorTask is the interface for a task that runs essentially forever or until something bad happens.
ZLocker is an interface for a lock that can fail.