package
3.1.2
Repository: https://github.com/pingcap/pd.git
Documentation: pkg.go.dev

# Functions

AttachAvailableFunc attaches a customize function for the store.
DiffRegionKeyInfo return the difference of key info between two RegionInfo.
DiffRegionPeersInfo return the difference of peers info between two RegionInfo.
DistinctScore returns the score that the other is distinct from the stores.
EncodeToString overrides hex.EncodeToString implementation.
HexRegionKey converts region key to hex format.
HexRegionKeyStr converts region key to hex format.
MergeRegions merge a set of RegionInfo by regionKey.
NewBasicCluster creates a BasicCluster.
NewKeyRange create a KeyRange with the given start key and end key.
NewRegionInfo creates RegionInfo with region's meta and leader peer.
NewRegionsInfo creates RegionsInfo with tree, regions, leaders and followers.
NewRegionStorage returns a region storage that is used to save regions.
NewScheduleKind creates a schedule kind with resource kind and schedule policy.
NewStorage creates Storage instance with Base.
NewStoreInfo creates StoreInfo with meta data.
NewStoreInfoWithLabel is create a store with specified labels.
NewStoreInfoWithSizeCount is create a store with size and count.
NewStoreNotFoundErr is for log of store not found.
NewStoresInfo create a StoresInfo with map of storeID to StoreInfo.
NewTestRegionInfo creates a RegionInfo for test.
RegionFromHeartbeat constructs a Region from region heartbeat.
RegionsToHexMeta converts regions' meta keys to hex format.
RegionToHexMeta converts a region meta's keys to hex format.
SetApproximateKeys sets the approximate keys for the region.
SetApproximateSize sets the approximate size for the region.
SetLastHeartbeatTS sets the time of last heartbeat for the store.
SetLeaderCount sets the leader count for the store.
SetLeaderSize sets the leader size for the store.
SetLeaderWeight sets the leader weight for the store.
SetPeers sets the peers for the region.
SetPendingPeerCount sets the pending peer count for the store.
SetReadBytes sets the read bytes for the region.
SetReadKeys sets the read keys for the region.
SetRegionConfVer sets the config version for the reigon.
SetRegionCount sets the Region count for the store.
SetRegionSize sets the Region size for the store.
SetRegionVersion sets the version for the reigon.
SetRegionWeight sets the Region weight for the store.
SetReportInterval sets the report interval for the region.
SetStoreAddress sets the address for the store.
SetStoreBlock stops balancer from selecting the store.
SetStoreLabels sets the labels for the store.
SetStoreStartTime sets the start timestamp for the store.
SetStoreState sets the state for the store.
SetStoreStats sets the statistics information for the store.
SetStoreUnBlock allows balancer to select the store.
SetStoreVersion sets the version for the store.
SetWrittenBytes sets the written bytes for the region.
SetWrittenKeys sets the written keys for the region.
SplitRegions split a set of RegionInfo by the middle of regionKey.
String converts slice of bytes to string without copy.
StringToKeyType creates a key type with string.
StringToSchedulePolicy creates a schedule policy with string.
ToUpperASCIIInplace bytes.ToUpper but zero-cost.
WithAddPeer adds a peer for the region.
WithDecConfVer decreases the config version of the region.
WithDecVersion decreases the version of the region.
WithDownPeers sets the down peers for the region.
WithEndKey sets the end key for the region.
WithIncConfVer increases the config version of the region.
WithIncVersion increases the version of the region.
WithLeader sets the leader for the region.
WithLearners sets the learners for the region.
WithNewPeerIds sets new ids for peers.
WithNewRegionID sets new id for the region.
WithPendingPeers sets the pending peers for the region.
WithPromoteLearner promotes the learner.
WithRemoveStorePeer removes the specified peer for the region.
WithReplacePeerStore replaces a peer's storeID with another ID.
WithStartKey sets the start key for the region.

# Constants

ByCount indicates that balance by count.
BySize indicates that balance by size.
EmptyRegionApproximateSize is the region approximate size of an empty region (heartbeat size <= 1MB).
Built-in priority level.
LeaderKind indicates the leader kind resource.
Built-in priority level.
Built-in priority level.
Raw indicates that the key is raw key.
RegionKind indicates the region kind resource.
Table indicates that the key is table key.
Txn indicates that the key is txn key.

# Variables

ErrRegionIsStale is error info for region is stale.
StoreBlockedCode is an error due to requesting an operation that is invalid due to a store being in a blocked state.
StoreTombstonedCode is an invalid operation was attempted on a store which is in a removed state.

# Structs

BasicCluster provides basic data member and interface for a tikv cluster.
HexRegionMeta is a region meta in the hex format.
KeyRange is a key range.
RegionInfo records detail region info.
RegionsInfo for export.
RegionStorage is used to save regions.
ScheduleKind distinguishes resources and schedule policy.
Storage wraps all kv operations, keep it stateless.
StoreErr can be newtyped or embedded in your own error.
StoreInfo contains information about a store.
StoresInfo contains information about all stores.

# Interfaces

RegionSetInformer provides access to a shared informer of regions.
StoreSetController is used to control stores' status.
StoreSetInformer provides access to a shared informer of stores.

# Type aliases

HexRegionsMeta is a slice of regions' meta in the hex format.
KeyType distinguishes different kinds of key types.
PriorityLevel lower level means higher priority.
RegionCreateOption used to create region.
RegionOption is used to select region.
ResourceKind distinguishes different kinds of resources.
SchedulePolicy distinguishes different kinds of schedule policies.
StoreBlockedErr has a Code() of StoreBlockedCode.
StoreCreateOption is used to create store.
StoreTombstonedErr is an invalid operation was attempted on a store which is in a removed state.