package
3.0.0-rc.3+incompatible
Repository: https://github.com/vitessio/vitess.git
Documentation: pkg.go.dev

# Packages

Package consultopo implements topo.Server with consul as the backend.
Package etcd2topo implements topo.Server with etcd as the backend.
Package events defines the structures used for events relating directly to individual topology elements, like keyspaces, shards, and tablets.
Package helpers contains a few utility classes to handle topo.Server objects, and transitions from one topo implementation to another.
Package memorytopo contains an implementation of the topo.Factory / topo.Conn interfaces based on an in-memory tree of data.
Package test contains utilities to test topo.Conn implementations.
Package topoproto contains utility functions to deal with the proto3 structures defined in proto/topodata.
Package topotests contains all the unit tests for the topo.Server code that is based on topo.Conn.

# Functions

CheckKeyspaceLocked can be called on a context to make sure we have the lock for a given keyspace.
CheckShardLocked can be called on a context to make sure we have the lock for a given shard.
DeleteTabletReplicationData deletes replication data.
DirEntriesSortByName sorts a slice of DirEntry objects by Name.
DirEntriesToStringArray is a helper method to extract the names from an []DirEntry.
FixShardReplication will fix the first problem it encounters within a ShardReplication object.
GetRegionByCell returns the region group this `cell` belongs to, if there's none, it returns the `cell` as region.
InCellList returns true if the cell list is empty, or if the passed cell is in the cell list.
IsErrType returns true if the error has the specified ErrorCode.
IsInServingGraph returns if a tablet appears in the serving graph.
IsRunningQueryService returns if a tablet is running the query service.
IsRunningUpdateStream returns if a tablet is running the update stream RPC service.
IsShardUsingRangeBasedSharding returns true if the shard name implies it is using range based sharding.
IsSlaveType returns if this type should be connected to a master db and actively replicating? MASTER is not obviously (only support one level replication graph) BACKUP, RESTORE, DRAINED may or may not be, but we don't know for sure.
IsSubjectToLameduck returns if a tablet is subject to being lameduck.
IsTrivialTypeChange returns if this db type be trivially reassigned without changes to the replication graph.
NewError creates a new topo error.
NewShardInfo returns a ShardInfo basing on shard with the keyspace / shard.
NewShardReplicationInfo is for topo.Server implementations to create the structure.
NewStatsConn returns a StatsConn.
NewTablet create a new Tablet record with the given id, cell, and hostname.
NewTabletInfo returns a TabletInfo basing on tablet with the version set.
NewWithFactory creates a new Server based on the given Factory.
Open returns a Server using the command line parameter flags for implementation, address and root.
OpenServer returns a Server using the provided implementation, address and root for the global server.
RegisterFactory registers a Factory for an implementation for a Server.
RemoveShardReplicationRecord is a low level function to remove an entry from the ShardReplication object.
TabletEquality returns true iff two Tablet are representing the same tablet process: same uid/cell, running on the same host / ports.
UpdateCellsToRegionsForTests overwrites the global map built by topo server init, and is meant for testing purpose only.
UpdateShardReplicationRecord is a low level function to add / update an entry to the ShardReplication object.
UpdateTabletReplicationData creates or updates the replication graph data for a tablet.
Validate makes sure a tablet is represented correctly in the topology server.
ValidateShardName takes a shard name and sanitizes it, and also returns the KeyRange.

# Constants

The following is the list of error codes.
Filenames for all object types.
Path for all object types.
GlobalCell is the name of the global cell.
GlobalReadOnlyCell is the name of the global read-only cell connection cell name.
The following is the list of error codes.
Filenames for all object types.
Path for all object types.
The following is the list of error codes.
The following is the list of error codes.
The following is the list of error codes.
The following is the list of error codes.
The following is the list of error codes.
The following is the list of error codes.
Filenames for all object types.
Filenames for all object types.
Path for all object types.
Filenames for all object types.
Filenames for all object types.
Filenames for all object types.
Path for all object types.
The following is the list of error codes.
TypeDirectory describes a directory.
TypeFile describes a file.
Filenames for all object types.

# Variables

DefaultLockTimeout is a good value to use as a default for locking a shard / keyspace.
LockTimeout is the command line flag that introduces a shorter timeout for locking topology structures.

# Structs

DirEntry is an entry in a directory, as returned by ListDir.
Error represents a topo error.
KeyspaceInfo is a meta struct that contains metadata to give the data more context and convenience.
KeyspaceShard is a type used by ResolveShardWildcard.
Lock describes a long-running lock on a keyspace or a shard.
Server is the main topo.Server object.
ShardInfo is a meta struct that contains metadata to give the data more context and convenience.
ShardReplicationInfo is the companion structure for ShardReplication.
The StatsConn is a wrapper for a Conn that emits stats for every operation.
TabletInfo is the container for a Tablet, read from the topology server.
WatchData is the structure returned by the Watch() API.
WatchSrvKeyspaceData is returned / streamed by WatchSrvKeyspace.
WatchSrvVSchemaData is returned / streamed by WatchSrvVSchema.
WorkflowInfo is a meta struct that contains the version of a Workflow.

# Interfaces

Conn defines the interface that must be implemented by topology plug-ins to be used with Vitess.
Factory is a factory interface to create Conn objects.
LockDescriptor is an interface that describes a lock.
MasterParticipation is the object returned by NewMasterParticipation.
Version is an interface that describes a file version.

# Type aliases

CancelFunc is returned by the Watch method.
DirEntryType is the type of an entry in a directory.
ErrorCode is the error code for topo errors.