package
0.0.0-20241215053428-3a1a44b4375c
Repository: https://github.com/pingcap-incubator/tinykv.git
Documentation: pkg.go.dev

# Functions

DiffRegionKeyInfo returns the difference of key info between two RegionInfo.
DiffRegionPeersInfo returns the difference of peers info between two RegionInfo.
HealthRegion checks if the region is healthy.
HealthRegionAllowPending checks if the region is healthy with allowing the pending peer.
HexRegionKey converts region key to hex format.
MergeRegions merge a set of RegionInfo by regionKey.
NewBasicCluster creates a BasicCluster.
NewRegionInfo creates RegionInfo with region's meta and leader peer.
NewRegionsInfo creates RegionsInfo with tree, regions, leaders and followers.
NewScheduleKind creates a schedule kind with resource kind and schedule strategy.
NewStorage creates Storage instance with Base.
NewStoreInfo creates StoreInfo with meta data.
NewStoreInfoWithIdAndCount is create a store with specified id and regionCount.
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.
SetApproximateSize sets the approximate size for the region.
SetAvailableFunc sets a customize function for the store.
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.
SetRegionCount sets the Region count for the store.
SetRegionSize sets the Region size for the store.
SetRegionWeight sets the Region weight for the store.
SetStoreAddress sets the address for the store.
SetStoreBlock stops balancer from selecting the store.
SetStoreState sets the state for the store.
SetStoreStats sets the statistics information for the store.
SetStoreUnBlock allows balancer to select the store.
SplitRegions split a set of RegionInfo by the middle of regionKey.
WithAddPeer adds a peer 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 adds learner to the region.
WithPendingPeers sets the pending peers for the region.
WithRemoveStorePeer removes the specified peer for the region.
WithStartKey sets the start key for the region.

# Constants

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.
RegionKind indicates the region kind resource.

# Variables

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.
RegionInfo records detail region info.
RegionsInfo for export.
ScheduleKind distinguishes resources and schedule strategy.
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

RegionsContainer is a container to store regions.
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.
PriorityLevel lower level means higher priority.
RegionCreateOption used to create region.
RegionOption is used to select region.
ResourceKind distinguishes different kinds of resources.
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.