package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Functions

NewGlobalAllocator creates a GlobalAllocator.
NewSimpleAllocator creates a new SimpleAllocator.
ParseConnID parses an uint64 connection ID to GlobalConnID.

# Constants

IDPoolInvalidValue indicates invalid value from IDPool.
LocalConnIDAllocator64TryCount is the try count of 64bits local connID allocation.
LocalConnIDBits64 is the number of bits of localConnID for 64bits global connection ID.
MaxLocalConnID64 is maximum localConnID for 64bits global connection ID.
MaxServerID64 is maximum serverID for 64bits global connection ID.
ReservedCount is the count of reserved connection IDs for internal processes.

# Variables

LocalConnIDBits32 is the number of bits of localConnID for 32bits global connection ID.
MaxLocalConnID32 is maximum localConnID for 32bits global connection ID.
MaxServerID32 is maximum serverID for 32bits global connection ID.
ServerIDBits32 is the number of bits of serverID for 32bits global connection ID.

# Structs

AutoIncPool simply do auto-increment to allocate ID.
GCID is the Global Connection ID, providing UNIQUE connection IDs across the whole TiDB cluster.
GlobalAllocator is global connection ID allocator.
LockFreeCircularPool is a lock-free circular implementation of IDPool.
SimpleAllocator is a simple connection id allocator used when GlobalKill feature is disable.

# Interfaces

Allocator allocates global connection IDs.
IDPool is the pool allocating & deallocating IDs.