interfaces

package
v0.4.31 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PriorityClassFromLegacySchedulerJob added in v0.4.8

func PriorityClassFromLegacySchedulerJob(priorityClasses map[string]types.PriorityClass, defaultPriorityClassName string, job LegacySchedulerJob) types.PriorityClass

Types

type LegacySchedulerJob

type LegacySchedulerJob interface {
	GetId() string
	GetQueue() string
	GetJobSet() string
	GetPerQueuePriority() uint32
	GetSubmitTime() time.Time
	GetAnnotations() map[string]string
	GetPodRequirements(priorityClasses map[string]types.PriorityClass) *schedulerobjects.PodRequirements
	GetPriorityClassName() string
	GetScheduledAtPriority() (int32, bool)
	GetNodeSelector() map[string]string
	GetAffinity() *v1.Affinity
	GetTolerations() []v1.Toleration
	GetResourceRequirements() v1.ResourceRequirements
	GetQueueTtlSeconds() int64
	// GetSchedulingKey returns (schedulingKey, true) if the job has a scheduling key associated with it and
	// (emptySchedulingKey, false) otherwise, where emptySchedulingKey is the zero value of the SchedulingKey type.
	GetSchedulingKey() (schedulerobjects.SchedulingKey, bool)
	// SchedulingOrderCompare defines the order in which jobs in a queue should be scheduled
	// (both when scheduling new jobs and when re-scheduling evicted jobs).
	// Specifically, compare returns
	//   - 0 if the jobs have equal job id,
	//   - -1 if job should be scheduled before other,
	//   - +1 if other should be scheduled before other.
	SchedulingOrderCompare(other LegacySchedulerJob) int
}

LegacySchedulerJob is the job interface used throughout the scheduler.

Jump to

Keyboard shortcuts

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