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

# Packages

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.Backend API based on an in-process memory map.
Package test contains utilities to test topo.Impl 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.Backend.

# 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.
CloseServers closes all registered Server.
DeleteTabletReplicationData deletes replication data.
FixShardReplication will fix the first problem it encounters within a ShardReplication object.
GetServer returns 'our' Server, going down this list: - If only one is registered, that's the one.
GetServerByName returns a specific Server by name, or nil.
InCellList returns true if the cell list is empty, or if the passed cell is in the cell list.
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.
NewShardInfo returns a ShardInfo basing on shard with the keyspace / shard.
NewShardReplicationInfo is for topo.Server implementations to create the structure.
NewTablet create a new Tablet record with the given id, cell, and hostname.
NewTabletInfo returns a TabletInfo basing on tablet with the version set.
RegisterServer adds an implementation for a Server.
RemoveShardReplicationRecord is a low level function to remove an entry from the ShardReplication object.
ResolveKeyspaceWildcard will resolve keyspace wildcards.
ResolveShardWildcard will resolve shard wildcards.
TabletComplete validates and normalizes the tablet.
TabletEquality returns true iff two Tablet are representing the same tablet process: same uid/cell, running on the same host / ports.
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.

# Variables

DefaultLockTimeout is a good value to use as a default for locking a shard / keyspace.
ErrBadVersion is returned by an update function that failed to update the data because the version was different.
ErrInterrupted is returned by functions that wait for a result when they are interrupted.
ErrNodeExists is returned by functions to specify the requested resource already exists.
ErrNoNode is returned by functions to specify the requested resource does not exist.
ErrNotEmpty is returned by functions to specify a child of the resource is still present and prevents the action from completing.
ErrNoUpdateNeeded can be returned by an 'UpdateFields' method to skip any update.
ErrPartialResult is returned by a function that could only get a subset of its results.
ErrTimeout is returned by functions that wait for a result when the timeout value is reached.
LockTimeout is the command line flag that introduces a shorter timeout for locking topology structures.

# Structs

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 a wrapper type that can have extra methods.
ShardInfo is a meta struct that contains metadata to give the data more context and convenience.
ShardReplicationInfo is the companion structure for ShardReplication.
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

Backend defines the interface that must be implemented by topology plug-ins to be used with Vitess.
Impl is the interface used to talk to a persistent backend storage server and locking service.
LockDescriptor is an interface that describes a lock.
MasterParticipation is the object returned by NewMasterParticipation.
SrvTopoServer is a subset of the Server API that only contains the serving graph read-only calls used by clients to resolve serving addresses, and how to get VSchema.
Version is an interface that describes a file version.
WildcardBackend is a subset of Server for the methods used by the wildcard code.

# Type aliases

CancelFunc is returned by the Watch method.