# Functions
Annotate takes the diff between the old and new version of a Job, the scheduler's plan annotations and will add annotations to the diff to aide human understanding of the plan.
GetBasePreemptionResourceFactory returns a preemption resource factory for CPU/Memory/Disk.
GetNetworkPreemptionResourceFactory returns a preemption resource factory for network assignments.
NewAllocReconciler creates a new reconciler that should be used to determine the changes required to bring the cluster state inline with the declared jobspec.
NewBatchScheduler is a factory function to instantiate a new batch scheduler.
NewBinPackIterator returns a BinPackIterator which tries to fit tasks potentially evicting other tasks based on a given priority.
NewConstraintChecker creates a ConstraintChecker for a set of constraints.
NewDeviceChecker creates a DeviceChecker.
NewDistinctHostsIterator creates a DistinctHostsIterator from a source.
NewDistinctPropertyIterator creates a DistinctPropertyIterator from a source.
NewDriverChecker creates a DriverChecker from a set of drivers.
NewEvalContext constructs a new EvalContext.
NewEvalEligibility returns an eligibility tracker for the context of an evaluation.
NewFeasibilityWrapper returns a FeasibleIterator based on the passed source and FeasibilityCheckers.
NewFeasibleRankIterator is used to return a new FeasibleRankIterator from a FeasibleIterator source.
NewGenericStack constructs a stack used for selecting service placements.
NewHarness is used to make a new testing harness.
NewHarnessWithState creates a new harness with the given state for testing purposes.
NewHostVolumeChecker creates a HostVolumeChecker from a set of volumes.
NewJobAntiAffinityIterator is used to create a JobAntiAffinityIterator that applies the given penalty for co-placement with allocs from this job.
NewLimitIterator returns a LimitIterator with a fixed limit of returned options.
MaxScoreIterator returns a MaxScoreIterator over the given source.
NewNodeAffinityIterator is used to create a NodeAffinityIterator that applies a weighted score according to whether nodes match any affinities in the job or task group.
NewNodeReschedulingPenaltyIterator is used to create a NodeReschedulingPenaltyIterator that applies the given scoring penalty for placement onto nodes in penaltyNodes.
PreemptionScoringIterator is used to create a score based on net aggregate priority of preempted allocations.
NewPropertySet returns a new property set used to guarantee unique property values for new allocation placements.
NewRandomIterator constructs a static iterator from a list of nodes after applying the Fisher-Yates algorithm for a random shuffle.
NewScheduler is used to instantiate and return a new scheduler given the scheduler name, initial state, and planner.
NewScoreNormalizationIterator is used to create a ScoreNormalizationIterator that averages scores from various iterators into a final score.
NewServiceScheduler is a factory function to instantiate a new service scheduler.
NewStaticIterator constructs a random iterator from a list of nodes.
NewStaticRankIterator returns a new static rank iterator over the given nodes.
NewSystemScheduler is a factory function to instantiate a new system scheduler.
NewSystemStack constructs a stack used for selecting system job placements.
# Constants
EvalComputedClassIneligible is used to mark the computed class as eligible for the evaluation.
EvalComputedClassEscaped signals that computed class can not determine eligibility because a constraint exists that is not captured by computed node classes.
EvalComputedClassIneligible is used to mark the computed class as ineligible for the evaluation.
EvalComputedClassUnknown is the initial state until the eligibility has been explicitly marked to eligible/ineligible or escaped.
.
SchedulerVersion is the version of the scheduler.
UpdateTypes denote the type of update to occur against the task group.
UpdateTypes denote the type of update to occur against the task group.
UpdateTypes denote the type of update to occur against the task group.
UpdateTypes denote the type of update to occur against the task group.
UpdateTypes denote the type of update to occur against the task group.
UpdateTypes denote the type of update to occur against the task group.
UpdateTypes denote the type of update to occur against the task group.
# Variables
BuiltinSchedulers contains the built in registered schedulers which are available.
# Structs
BasePreemptionResource implements PreemptionResource for CPU/Memory/Disk.
BinPackIterator is a RankIterator that scores potential options based on a bin-packing algorithm.
ConstraintChecker is a FeasibilityChecker which returns nodes that match a given set of constraints.
DeviceChecker is a FeasibilityChecker which returns whether a node has the devices necessary to scheduler a task group.
DistinctHostsIterator is a FeasibleIterator which returns nodes that pass the distinct_hosts constraint.
DistinctPropertyIterator is a FeasibleIterator which returns nodes that pass the distinct_property constraint.
DriverChecker is a FeasibilityChecker which returns whether a node has the drivers necessary to scheduler a task group.
EvalCache is used to cache certain things during an evaluation.
EvalContext is a Context used during an Evaluation.
EvalEligibility tracks eligibility of nodes by computed node class over the course of an evaluation.
FeasibilityWrapper is a FeasibleIterator which wraps both job and task group FeasibilityCheckers in which feasibility checking can be skipped if the computed node class has previously been marked as eligible or ineligible.
FeasibleRankIterator is used to consume from a FeasibleIterator and return an unranked node with base ranking.
GenericScheduler is used for 'service' and 'batch' type jobs.
GenericStack is the Stack used for the Generic scheduler.
Harness is a lightweight testing harness for schedulers.
HostVolumeChecker is a FeasibilityChecker which returns whether a node has the host volumes necessary to schedule a task group.
JobAntiAffinityIterator is used to apply an anti-affinity to allocating along side other allocations from this job.
LimitIterator is a RankIterator used to limit the number of options that are returned before we artificially end the stream.
MaxScoreIterator is a RankIterator used to return only a single result of the item with the highest score.
NetworkChecker is a FeasibilityChecker which returns whether a node has the network resources necessary to schedule the task group.
NetworkPreemptionResource implements PreemptionResource for network assignments It only looks at MBits needed.
NodeAffinityIterator is used to resolve any affinity rules in the job or task group, and apply a weighted score to nodes if they match.
NodeReschedulingPenaltyIterator is used to apply a penalty to a node that had a previous failed allocation for the same job.
PreemptionScoringIterator is used to score nodes according to the combination of preemptible allocations in them.
Preemptor is used to track existing allocations and find suitable allocations to preempt.
Rank is used to provide a score and various ranking metadata along with a node when iterating.
RejectPlan is used to always reject the entire plan and force a state refresh.
ScoreNormalizationIterator is used to combine scores from various prior iterators and combine them into one final score.
SetStatusError is used to set the status of the evaluation to the given error.
SpreadIterator is used to spread allocations across a specified attribute according to preset weights.
StaticIterator is a FeasibleIterator which returns nodes in a static order.
StaticRankIterator is a RankIterator that returns a static set of results.
SystemScheduler is used for 'system' jobs.
SystemStack is the Stack used for the System scheduler.
# Interfaces
Context is used to track contextual information used for placement.
JobContextualIterator is an iterator that can have the job and task group set on it.
FeasibilityChecker is used to check if a single node meets feasibility constraints.
FeasibleIterator is used to iteratively yield nodes that match feasibility constraints.
Planner interface is used to submit a task allocation plan.
PreemptionResource interface is implemented by different types of resources.
RankFeasibleIterator is used to iteratively yield nodes along with ranking metadata.
Scheduler is the top level instance for a scheduler.
Stack is a chained collection of iterators.
State is an immutable view of the global state.
StateEnterprise are the available state store methods for the enterprise version.
VerConstraints is the interface implemented by both go-verson constraints and semver constraints.
# Type aliases
Factory is used to instantiate a new Scheduler.
PreemptionResourceFactory returns a new PreemptionResource.