# Functions
IsolationComparer creates a ContainerComparer to sort container by isolation score.
NewCandidates creates ContainerCandidates with container list.
NewEngineFilter creates a filter that only keeps allowedEngines.
NewExcludedFilter creates a Filter that filters all specified containers.
NewIsolationFilter creates a filter that filters out containers with isolationLevel For example, a resource has 3 replicas in z1, z2 and z3 individually.
NewLabelConstaintFilter creates a filter that selects containers satisfy the constraints.
NewLocationImprover creates a filter that filters all containers that have lower or equal distinct score than specified container.
NewLocationSafeguard creates a filter that filters all containers that have lower distinct score than specified container.
NewOrdinaryEngineFilter creates a filter that only keeps ordinary engine containers.
NewPlacementLeaderSafeguard creates a filter that ensures after transfer a leader with existed peer, the placement restriction will not become worse.
NewPlacementSafeguard creates a filter that ensures after replace a peer with new peer, the placement restriction will not become worse.
NewSpecialUseFilter creates a filter that filters out normal containers.
NewStorageThresholdFilter creates a Filter that filters all containers that are almost full.
ResourceScoreComparer creates a ContainerComparer to sort container by resource score.
SelectSourceContainers selects containers that be selected as source container from the list.
SelectTargetContainers selects containers that be selected as target container from the list.
Source checks if container can pass all Filters as source container.
Target checks if container can pass all Filters as target container.
# Constants
EngineKey is the label key used to indicate engine.
EngineTiFlash is the tiflash value of the engine label.
EngineTiKV indicates the tikv engine in metrics.
SpecialUseHotResource is the hot resource value of special use label.
SpecialUseKey is the label used to indicate special use storage.
SpecialUseReserved is the reserved value of special use label.
# Variables
LogWhySkipped cause why the filter skip a container.
# Structs
ContainerCandidates wraps container list and provide utilities to select source or target container to schedule.
ContainerStateFilter is used to determine whether a container can be selected as the source or target of the schedule based on the container's state.
# Interfaces
Filter is an interface to filter source and target container.
ResourceFitter is the interface that can fit a resource against placement rules.
# Type aliases
ContainerComparer compares 2 containers.