package
2.1.0-beta+incompatible
Repository: https://github.com/rleungx/pd.git
Documentation: pkg.go.dev
# Functions
DiffRegionKeyInfo return the difference of key info between two RegionInfo.
DiffRegionPeersInfo return the difference of peers info between two RegionInfo.
HealthRegion checks if the region is healthy.
MergeRegions merge a set of metapb.Region by regionKey.
NewKV creates KV instance with KVBase.
NewMemoryKV returns an in-memory kvBase for testing.
NewMockIDAllocator create a new MockIDAllocator.
NewRegion create a metapb.Region.
NewRegionInfo creates RegionInfo with region's meta and leader peer.
NewRegionsInfo creates RegionsInfo with tree, regions, leaders and followers.
NewRollingStats returns a RollingStats.
NewStoreInfo creates StoreInfo with meta data.
NewStoresInfo create a StoresInfo with map of storeID to StoreInfo.
RegionFromHeartbeat constructs a Region from region heartbeat.
SplitRegions split a set of metapb.Region by the middle of regionKey.
# 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
ErrStoreIsBlocked is for log of store is blocked.
ErrStoreNotFound is for log of store no found.
# Structs
HotRegionsStat records all hot regions statistics.
KV wraps all kv operations, keep it stateless.
MockIDAllocator mocks IDAllocator and it is only used for test.
RegionInfo records detail region info.
RegionsInfo for export.
RegionStat records each hot region's statistics.
RegionStats records a list of regions' statistics and distribution status.
RollingStats provides rolling statistics with specified window size.
RollingStoreStats are multiple sets of recent historical records with specified windows size.
StoreHotRegionInfos : used to get human readable description for hot regions.
StoreInfo contains information about a store.
StoresInfo is a map of storeID to StoreInfo.
# Interfaces
IDAllocator is the allocator to generate unique ID.
KVBase is an abstract interface for load/save pd cluster data.
# Type aliases
PriorityLevel lower level means higher priority.
RegionOption used to select region.
RegionsStat is a list of a group region state type.
ResourceKind distinguishes different kinds of resources.
StoreHotRegionsStat used to record the hot region statistics group by store.