Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code int
Code is the status code/type which is returned from plugins.
const ( // Success means that plugin ran correctly and found job schedulable. // NOTE: A nil status is also considered as "Success". Success Code = iota // Error is used for internal plugin errors, unexpected input, etc. Error // Unschedulable is used when a plugin finds a job unschedulable. // The accompanying status message should explain why the pod is unschedulable. Unschedulable // Wait is used when a Permit plugin finds a pod scheduling should wait. Wait // Skip is used when a Bind plugin chooses to skip binding. Skip )
These are predefined codes used in a status.
type FilterPlugin ¶
type PluginFactory ¶
type PluginFactory func(client client.Client, recorder record.EventRecorder) Plugin
type PreDequeuePlugin ¶
type PreFilterPlugin ¶
type QueueUnit ¶
type QueueUnit struct { Tenant string Priority *int32 Object client.Object SchedPolicy *v1.SchedulingPolicy Specs map[v1.ReplicaType]*v1.ReplicaSpec Status *v1.JobStatus Resources corev1.ResourceList SpotResources corev1.ResourceList Owner workqueue.RateLimitingInterface }
func (*QueueUnit) SpotQueueUnit ¶
SpotQueueUnit returns a wrapped queue unit which takes spot resource as its total resource requests and shallow copy other fields as its properties.
type QueueUnitScore ¶
type ScorePlugin ¶
type Status ¶
type Status interface { // Code returns code of the status. Code() Code // Message returns a concatenated message on reasons of the status. Message() string // Reasons returns reasons of the status. Reasons() []string // AppendReason appends given reason to the status. AppendReason(reason string) // IsSuccess returns true if and only if "status" is nil or Code is "Success". IsSuccess() bool // IsUnschedulable returns true if "status" is Unschedulable (Unschedulable or UnschedulableAndUnresolvable). IsUnschedulable() bool // AsError returns nil if the status is a success; otherwise returns an "error" object // with a concatenated message on reasons of the status. AsError() error }
type TenantPlugin ¶
Click to show internal directories.
Click to hide internal directories.