# Functions
CheckOperatorValid checks if the operator is valid.
CreateAddPeerSteps creates an OperatorStep list that add a new Peer.
CreateMergeRegionOperator creates an Operator that merge two region into one.
CreateMovePeerOperator creates an Operator that replaces an old peer with a new peer.
CreateRemovePeerOperator creates an Operator that removes a peer from region.
CreateScheduler creates a scheduler with registered creator func.
DistinctScore returns the score that the other is distinct from the stores.
FilterSource checks if store can pass all Filters as source store.
FilterTarget checks if store can pass all Filters as target store.
GenRangeCluster gets a range cluster by specifying start key and end key.
NewBalanceSelector creates a BalanceSelector instance.
NewBasicCluster creates a BasicCluster.
NewBlockFilter creates a Filter that filters all stores that are blocked from balance.
NewCacheFilter creates a Filter that filters all stores that are in the cache.
NewDisconnectFilter creates a Filter that filters all stores that are disconnected.
NewDistinctScoreFilter creates a filter that filters all stores that have lower distinct score than specified store.
NewExcludedFilter creates a Filter that filters all specified stores.
NewHealthFilter creates a Filter that filters all stores that are Busy or Down.
NewLimiter create a schedule limiter.
NewMergeChecker creates a merge checker.
NewMockCluster creates a new MockCluster.
NewMockSchedulerOptions creates a mock schedule option.
NewNamespaceChecker creates a namespace checker.
NewNamespaceFilter creates a Filter that filters all stores that are not belong to a namespace.
NewOperator creates a new operator.
NewOpInfluence creates a OpInfluence.
NewPendingPeerCountFilter creates a Filter that filters all stores that are currently handling too many pending peers.
NewRandomSelector creates a RandomSelector instance.
NewRegionScatterer creates a region scatterer.
NewRejectLeaderFilter creates a Filter that filters stores that marked as rejectLeader from being the target of leader transfer.
NewReplicaChecker creates a replica checker.
NewReplicaSelector creates a ReplicaSelector instance.
NewSnapshotCountFilter creates a Filter that filters all stores that are currently handling too many snapshots.
NewStateFilter creates a Filter that filters all stores that are not UP.
NewStorageThresholdFilter creates a Filter that filters all stores that are almost full.
ParseOperatorKind converts string (flag name list concat by ',') to OperatorKind.
RegisterScheduler binds a scheduler creator.
# Constants
LeaderOperatorWaitTime is the duration that when a leader operator lives longer than it, the operator will be considered timeout.
Initiated by adjacent region scheduler.
Initiated by admin.
Initiated by balancers.
Initiated by hot region scheduler.
Include leader transfer.
Initiated by merge checkers or merge schedulers.
Initiated by range scheduler.
Include peer movement.
Initiated by replica checkers.
Flags for flow.
RegionHeartBeatReportInterval is the heartbeat report interval of a region.
RegionOperatorWaitTime is the duration that when a region operator lives longer than it, the operator will be considered timeout.
RejectLeader is the label property type that sugguests a store should not have any region leaders.
Flags for flow.
# Variables
Simulating is an option to overpass the impact of accelerated time.
# Structs
AddLearner is an OperatorStep that adds a region learner peer.
AddPeer is an OperatorStep that adds a region peer.
BalanceSelector selects source/target from store candidates based on their resource scores.
BasicCluster provides basic data member and interface for a tikv cluster.
HotSpotCache is a cache hold hot regions.
Limiter a counter that limits the number of operators.
MergeChecker ensures region to merge with adjacent region when size is small.
MergeRegion is an OperatorStep that merge two regions.
MockCluster is used to mock clusterInfo for test use.
MockSchedulerOptions is a mock of SchedulerOptions which implements Options interface.
NamespaceChecker ensures region to go to the right place.
Operator contains execution steps generated by scheduler.
OperatorHistory is used to log and visualize completed operators.
OpInfluence records the influence of the cluster.
PromoteLearner is an OperatorStep that promotes a region learner peer to normal voter.
RandomSelector selects source/target store randomly.
RangeCluster isolates the cluster by range.
RegionScatterer scatters regions.
RemovePeer is an OperatorStep that removes a region peer.
ReplicaChecker ensures region has the best replicas.
ReplicaSelector selects source/target store candidates based on their distinct scores based on a region's peer stores.
SplitRegion is an OperatorStep that splits a region.
StoreInfluence records influences that pending operators will make.
StoreStateFilter is used to determine whether a store can be selected as the source or target of the schedule based on the store's state.
TransferLeader is an OperatorStep that transfers a region's leader.
# Interfaces
Cluster provides an overview of a cluster's regions distribution.
Filter is an interface to filter source and target store.
NamespaceOptions for namespace cluster.
OperatorStep describes the basic scheduling steps that can not be subdivided.
Options for schedulers.
Scheduler is an interface to schedule resources.
# Type aliases
CreateSchedulerFunc is for creating scheudler.
FlowKind is a identify Flow types.
OperatorKind is a bit field to identify operator types.