pricer

package
v0.20.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GangUniformityLabelIsNotIndexedUnschedulableReason = "uniformity label is not indexed"
	GangNoNodesWithUniformityLabelUnschedulableReason  = "no nodes with uniformity label"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GangPricer

type GangPricer struct {
	// contains filtered or unexported fields
}

func NewGangPricer

func NewGangPricer(
	nodeScheduler NodeScheduler,
	jobDb jobdb.JobRepository,
	nodeDb *nodedb.NodeDb,
) *GangPricer

func (*GangPricer) Price

Price determines the lowest price across all nodes at which the provided gang can be scheduled at. This method has no side effects and utilises the state provided at GangPricer instantiation.

type GangPricingResult

type GangPricingResult struct {
	Evaluated           bool
	Schedulable         bool
	Price               float64
	UnschedulableReason string
}

type MinPriceNodeScheduler

type MinPriceNodeScheduler struct {
	// contains filtered or unexported fields
}

func NewMinPriceNodeScheduler

func NewMinPriceNodeScheduler(jobDb jobdb.JobRepository) *MinPriceNodeScheduler

func (*MinPriceNodeScheduler) Schedule

Schedule This function is responsible for determining if a job can be scheduled on a node, and the minimum price at which this can be achieved High level steps: - Determine all the jobs that can be preempted - Order these jobs by cost ascending - Attempt to schedule the new job on the node, preempting one job at a time until the job fits - Return NodeSchedulingResult, which is a summary of how the given job could be scheduled on the given node, including whether it's even possible

type NodeScheduler

type NodeScheduler interface {
	Schedule(*context.JobSchedulingContext, *internaltypes.Node, set.Set[string]) (*NodeSchedulingResult, error)
}

type NodeSchedulingResult

type NodeSchedulingResult struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL