package
2.0.0+incompatible
Repository: https://github.com/nerdatmath/vitess.git
Documentation: pkg.go.dev
# Functions
No description provided by the author
CreateElection returns an initialized elector.
CreateMutex initializes an unacquired mutex.
No description provided by the author
Create a path and any pieces required, think mkdir -p.
No description provided by the author
No description provided by the author
Dial a ZK server and waits for connection event.
No description provided by the author
GetZkSubprocessFlags returns the flags necessary to run a sub-process that would connect to the same zk servers as this process (assuming the environment of the sub-process is the same as ours).
Read 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.
The lexically lowest node is the lock holder - verify that this path holds the lock.
resolve 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.
ZkCellFromZkPath extracts the cell name from a zkPath.
returns all the known cells, alphabetically ordered.
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
PERM_DIRECTORY are default permissions for a node.
PERM_FILE 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.
This error is returned by functions that wait for a result when they are interrupted.
This error 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.
No description provided by the author
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 connection interface.
ElectorTask is the interface for a task that runs essentially forever or until something bad happens.
Stat represents metadata about a ZK node.
ZLocker is an interface for a lock that can fail.
# Type aliases
ChangeFunc is a function type for use with Conn.RetryChange().
No description provided by the author