# Functions
MatchLabelConstraints checks if a store matches label constraints list.
NewRegionRuleFitCacheManager returns RegionRuleFitCacheManager.
NewRuleManager creates a RuleManager instance.
ValidateFit checks whether regionFit is valid.
ValidateRegion checks whether region is healthy.
ValidateStores checks whether store isn't offline, unhealthy and disconnected.
# Constants
Exists restricts the store should have the label.
Follower matches a follower.
In restricts the store label value should in the value list.
Leader matches a leader.
Learner matches a learner.
NotExists restricts the store should not have the label.
NotIn restricts the store label value should not in the value list.
RuleOpAdd a placement rule, only need to specify the field *Rule.
RuleOpDel a placement rule, only need to specify the field `GroupID`, `ID`, `MatchID`.
Voter can either match a leader peer or follower peer.
# Structs
GroupBundle represents a rule group and all rules belong to the group.
LabelConstraint is used to filter store when trying to place peer of a region.
RegionFit is the result of fitting a region's peers to rule list.
RegionRuleFitCacheManager stores each region's RegionFit Result and involving variables only when the RegionFit result is satisfied with its rules RegionRuleFitCacheManager caches RegionFit result for each region only when: 1.
Rule is the placement rule that can be checked against a region.
RuleFit is the result of fitting status of a Rule.
RuleGroup defines properties of a rule group.
RuleManager is responsible for the lifecycle of all placement Rules.
RuleOp is for batching placement rule actions.
# Interfaces
StoreSet represents the store container.
# Type aliases
LabelConstraintOp defines how a LabelConstraint matches a store.
PeerRoleType is the expected peer type of the placement rule.
RuleOpType indicates the operation type.