# Functions
CompareResourceFit determines the superiority of 2 fits.
FitResource tries to fit peers of a resource to the rules.
MatchLabelConstraints checks if a container matches label constraints list.
NewRuleFromRPC creates the rule from rpc.
NewRuleManager creates a RuleManager instance.
RPCRules convert rules to rpc placement rules.
# Constants
Exists restricts the container should have the label.
Follower matches a follower.
In restricts the container label value should in the value list.
Leader matches a leader.
Learner matches a learner.
NotExists restricts the container should not have the label.
NotIn restricts the container 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 container when trying to place peer of a resource.
ResourceFit is the result of fitting a resource's peers to rule list.
Rule is the placement rule that can be checked against a resource.
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
ContainerSet represents the container.
# Type aliases
LabelConstraintOp defines how a LabelConstraint matches a container.
ReplicaRoleType is the expected peer type of the placement rule.
RuleOpType indicates the operation type.