schedulerobjects

package
v0.16.8-patch1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthSchedulerobjects        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSchedulerobjects          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSchedulerobjects = fmt.Errorf("proto: unexpected end of group")
)
View Source
var JobRunState_name = map[int32]string{
	0: "UNKNOWN",
	1: "PENDING",
	2: "RUNNING",
	3: "SUCCEEDED",
	4: "FAILED",
}
View Source
var JobRunState_value = map[string]int32{
	"UNKNOWN":   0,
	"PENDING":   1,
	"RUNNING":   2,
	"SUCCEEDED": 3,
	"FAILED":    4,
}

Functions

func V1ResourceListFromResourceList added in v0.3.47

func V1ResourceListFromResourceList(rl ResourceList) v1.ResourceList

Types

type AllocatableByPriorityAndResourceType

type AllocatableByPriorityAndResourceType QuantityByTAndResourceType[int32]

AllocatableByPriorityAndResourceType accounts for resources that can be allocated to pods of a given priority. E.g., AllocatableByPriorityAndResourceType[5]["cpu"] is the amount of CPU available to pods with priority 5, where alloctable resources = unused resources + resources allocated to lower-priority pods.

func NewAllocatableByPriorityAndResourceType

func NewAllocatableByPriorityAndResourceType(priorities []int32, rl ResourceList) AllocatableByPriorityAndResourceType

func (AllocatableByPriorityAndResourceType) MarkAllocated

MarkAllocated indicates resources have been allocated to pods of priority p, hence reducing the resources allocatable to pods of priority p or lower.

type Executor

type Executor struct {
	// Name of the executor.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Pool that the executor belongs to.
	Pool string `protobuf:"bytes,2,opt,name=pool,proto3" json:"pool,omitempty"`
	// The nodes available for scheduling via this executor.
	Nodes []*Node `protobuf:"bytes,3,rep,name=nodes,proto3" json:"nodes,omitempty"`
	// Last time the executor provided a heartbeat to say it was still accepting job.
	LastUpdateTime *types.Timestamp `protobuf:"bytes,5,opt,name=lastUpdateTime,proto3" json:"lastUpdateTime,omitempty"`
	// Jobs that are owned by the cluster but are not assigned to any node.
	UnassignedJobRuns []string `protobuf:"bytes,9,rep,name=unassigned_job_runs,json=unassignedJobRuns,proto3" json:"unassignedJobRuns,omitempty"`
}

Executor represents an executor running on a worker cluster

func (*Executor) AllRuns

func (m *Executor) AllRuns() []string

func (*Executor) Descriptor

func (*Executor) Descriptor() ([]byte, []int)

func (*Executor) GetId

func (m *Executor) GetId() string

func (*Executor) GetLastUpdateTime

func (m *Executor) GetLastUpdateTime() *types.Timestamp

func (*Executor) GetNodes

func (m *Executor) GetNodes() []*Node

func (*Executor) GetPool

func (m *Executor) GetPool() string

func (*Executor) GetUnassignedJobRuns

func (m *Executor) GetUnassignedJobRuns() []string

func (*Executor) Marshal

func (m *Executor) Marshal() (dAtA []byte, err error)

func (*Executor) MarshalTo

func (m *Executor) MarshalTo(dAtA []byte) (int, error)

func (*Executor) MarshalToSizedBuffer

func (m *Executor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Executor) ProtoMessage

func (*Executor) ProtoMessage()

func (*Executor) Reset

func (m *Executor) Reset()

func (*Executor) Size

func (m *Executor) Size() (n int)

func (*Executor) String

func (m *Executor) String() string

func (*Executor) Unmarshal

func (m *Executor) Unmarshal(dAtA []byte) error

func (*Executor) XXX_DiscardUnknown

func (m *Executor) XXX_DiscardUnknown()

func (*Executor) XXX_Marshal

func (m *Executor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Executor) XXX_Merge

func (m *Executor) XXX_Merge(src proto.Message)

func (*Executor) XXX_Size

func (m *Executor) XXX_Size() int

func (*Executor) XXX_Unmarshal

func (m *Executor) XXX_Unmarshal(b []byte) error

type ExecutorSettings added in v0.15.0

type ExecutorSettings struct {
	ExecutorId   string           `protobuf:"bytes,1,opt,name=executorId,proto3" json:"executorId,omitempty"`
	Cordoned     bool             `protobuf:"varint,2,opt,name=cordoned,proto3" json:"cordoned,omitempty"`
	CordonReason string           `protobuf:"bytes,3,opt,name=cordonReason,proto3" json:"cordonReason,omitempty"`
	SetByUser    string           `protobuf:"bytes,4,opt,name=setByUser,proto3" json:"setByUser,omitempty"`
	SetAtTime    *types.Timestamp `protobuf:"bytes,5,opt,name=setAtTime,proto3" json:"setAtTime,omitempty"`
}

func (*ExecutorSettings) Descriptor added in v0.15.0

func (*ExecutorSettings) Descriptor() ([]byte, []int)

func (*ExecutorSettings) GetCordonReason added in v0.15.0

func (m *ExecutorSettings) GetCordonReason() string

func (*ExecutorSettings) GetCordoned added in v0.15.0

func (m *ExecutorSettings) GetCordoned() bool

func (*ExecutorSettings) GetExecutorId added in v0.15.0

func (m *ExecutorSettings) GetExecutorId() string

func (*ExecutorSettings) GetSetAtTime added in v0.15.3

func (m *ExecutorSettings) GetSetAtTime() *types.Timestamp

func (*ExecutorSettings) GetSetByUser added in v0.15.3

func (m *ExecutorSettings) GetSetByUser() string

func (*ExecutorSettings) Marshal added in v0.15.0

func (m *ExecutorSettings) Marshal() (dAtA []byte, err error)

func (*ExecutorSettings) MarshalTo added in v0.15.0

func (m *ExecutorSettings) MarshalTo(dAtA []byte) (int, error)

func (*ExecutorSettings) MarshalToSizedBuffer added in v0.15.0

func (m *ExecutorSettings) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ExecutorSettings) ProtoMessage added in v0.15.0

func (*ExecutorSettings) ProtoMessage()

func (*ExecutorSettings) Reset added in v0.15.0

func (m *ExecutorSettings) Reset()

func (*ExecutorSettings) Size added in v0.15.0

func (m *ExecutorSettings) Size() (n int)

func (*ExecutorSettings) String added in v0.15.0

func (m *ExecutorSettings) String() string

func (*ExecutorSettings) Unmarshal added in v0.15.0

func (m *ExecutorSettings) Unmarshal(dAtA []byte) error

func (*ExecutorSettings) XXX_DiscardUnknown added in v0.15.0

func (m *ExecutorSettings) XXX_DiscardUnknown()

func (*ExecutorSettings) XXX_Marshal added in v0.15.0

func (m *ExecutorSettings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExecutorSettings) XXX_Merge added in v0.15.0

func (m *ExecutorSettings) XXX_Merge(src proto.Message)

func (*ExecutorSettings) XXX_Size added in v0.15.0

func (m *ExecutorSettings) XXX_Size() int

func (*ExecutorSettings) XXX_Unmarshal added in v0.15.0

func (m *ExecutorSettings) XXX_Unmarshal(b []byte) error

type JobRunState added in v0.3.49

type JobRunState int32
const (
	JobRunState_UNKNOWN   JobRunState = 0
	JobRunState_PENDING   JobRunState = 1
	JobRunState_RUNNING   JobRunState = 2
	JobRunState_SUCCEEDED JobRunState = 3
	JobRunState_FAILED    JobRunState = 4
)

func (JobRunState) EnumDescriptor added in v0.3.49

func (JobRunState) EnumDescriptor() ([]byte, []int)

func (JobRunState) String added in v0.3.49

func (x JobRunState) String() string

type JobSchedulingInfo

type JobSchedulingInfo struct {
	Lifetime          uint32           `protobuf:"varint,1,opt,name=lifetime,proto3" json:"lifetime,omitempty"`
	AtMostOnce        bool             `protobuf:"varint,2,opt,name=at_most_once,json=atMostOnce,proto3" json:"atMostOnce,omitempty"`
	Preemptible       bool             `protobuf:"varint,3,opt,name=preemptible,proto3" json:"preemptible,omitempty"`
	ConcurrencySafe   bool             `protobuf:"varint,4,opt,name=concurrency_safe,json=concurrencySafe,proto3" json:"concurrencySafe,omitempty"`
	PriorityClassName string           `protobuf:"bytes,6,opt,name=priority_class_name,json=priorityClassName,proto3" json:"priorityClassName,omitempty"`
	SubmitTime        *types.Timestamp `protobuf:"bytes,7,opt,name=submit_time,json=submitTime,proto3" json:"submitTime,omitempty"`
	// In-queue priority. I.e., not the priority class priority.
	Priority uint32 `protobuf:"varint,8,opt,name=priority,proto3" json:"priority,omitempty"`
	// Kubernetes objects that make up this job and their respective scheduling requirements.
	ObjectRequirements []*ObjectRequirements `protobuf:"bytes,5,rep,name=object_requirements,json=objectRequirements,proto3" json:"objectRequirements,omitempty"`
	Version            uint32                `protobuf:"varint,9,opt,name=version,proto3" json:"version,omitempty"`
}

Minimal job representation used by the scheduler.

func (*JobSchedulingInfo) Descriptor

func (*JobSchedulingInfo) Descriptor() ([]byte, []int)

func (*JobSchedulingInfo) GetAtMostOnce

func (m *JobSchedulingInfo) GetAtMostOnce() bool

func (*JobSchedulingInfo) GetConcurrencySafe

func (m *JobSchedulingInfo) GetConcurrencySafe() bool

func (*JobSchedulingInfo) GetLifetime

func (m *JobSchedulingInfo) GetLifetime() uint32

func (*JobSchedulingInfo) GetObjectRequirements

func (m *JobSchedulingInfo) GetObjectRequirements() []*ObjectRequirements

func (*JobSchedulingInfo) GetPodRequirements added in v0.3.78

func (info *JobSchedulingInfo) GetPodRequirements() *PodRequirements

func (*JobSchedulingInfo) GetPreemptible

func (m *JobSchedulingInfo) GetPreemptible() bool

func (*JobSchedulingInfo) GetPriority added in v0.3.50

func (m *JobSchedulingInfo) GetPriority() uint32

func (*JobSchedulingInfo) GetPriorityClassName added in v0.3.50

func (m *JobSchedulingInfo) GetPriorityClassName() string

func (*JobSchedulingInfo) GetSubmitTime added in v0.3.50

func (m *JobSchedulingInfo) GetSubmitTime() *types.Timestamp

func (*JobSchedulingInfo) GetVersion added in v0.3.63

func (m *JobSchedulingInfo) GetVersion() uint32

func (*JobSchedulingInfo) Marshal

func (m *JobSchedulingInfo) Marshal() (dAtA []byte, err error)

func (*JobSchedulingInfo) MarshalTo

func (m *JobSchedulingInfo) MarshalTo(dAtA []byte) (int, error)

func (*JobSchedulingInfo) MarshalToSizedBuffer

func (m *JobSchedulingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*JobSchedulingInfo) ProtoMessage

func (*JobSchedulingInfo) ProtoMessage()

func (*JobSchedulingInfo) Reset

func (m *JobSchedulingInfo) Reset()

func (*JobSchedulingInfo) Size

func (m *JobSchedulingInfo) Size() (n int)

func (*JobSchedulingInfo) String

func (m *JobSchedulingInfo) String() string

func (*JobSchedulingInfo) Unmarshal

func (m *JobSchedulingInfo) Unmarshal(dAtA []byte) error

func (*JobSchedulingInfo) XXX_DiscardUnknown

func (m *JobSchedulingInfo) XXX_DiscardUnknown()

func (*JobSchedulingInfo) XXX_Marshal

func (m *JobSchedulingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*JobSchedulingInfo) XXX_Merge

func (m *JobSchedulingInfo) XXX_Merge(src proto.Message)

func (*JobSchedulingInfo) XXX_Size

func (m *JobSchedulingInfo) XXX_Size() int

func (*JobSchedulingInfo) XXX_Unmarshal

func (m *JobSchedulingInfo) XXX_Unmarshal(b []byte) error

type Node

type Node struct {
	// Id associated with the node. Must be unique across all clusters.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Kubernetes node name. Not guaranteed to be unique across clusters.
	Name string `protobuf:"bytes,12,opt,name=name,proto3" json:"name,omitempty"`
	// Name of the executor to which this node belongs.
	Executor string `protobuf:"bytes,19,opt,name=executor,proto3" json:"executor,omitempty"`
	// Time at which this node was last updated.
	// Used to garbage collect nodes that have been removed.
	LastSeen *types.Timestamp `protobuf:"bytes,2,opt,name=last_seen,json=lastSeen,proto3" json:"lastSeen,omitempty"`
	// Kubernetes taints.
	Taints []*v1.Taint `protobuf:"bytes,5,rep,name=taints,proto3" json:"taints,omitempty"`
	// Kubernetes labels.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// Total resources on this node.
	TotalResources ResourceList `protobuf:"bytes,7,opt,name=total_resources,json=totalResources,proto3" json:"totalResources"`
	// Resources available for jobs of a given priority.
	// E.g., AvailableResources[5]["cpu"] is the amount of CPU available to jobs with priority 5,
	// where available resources = unused resources + resources assigned to lower-priority jobs.
	AllocatableByPriorityAndResource map[int32]ResourceList `` // Deprecated: Do not use.
	/* 238-byte string literal not displayed */
	// Ids of the job runs currently assigned to this node and their current state.
	StateByJobRunId map[string]JobRunState `` /* 231-byte string literal not displayed */
	// Resource allocated to non-Armada pods on this node.
	UnallocatableResources map[int32]ResourceList `` /* 206-byte string literal not displayed */
	// If true, no new jobs should be scheduled onto this node, e.g., because the node has been cordoned.
	Unschedulable bool `protobuf:"varint,15,opt,name=unschedulable,proto3" json:"unschedulable,omitempty"`
	// This should only be used for metrics
	// This is the type the node should be reported as. It is simply a label to categorise the group the node belongs to
	ReportingNodeType string `protobuf:"bytes,17,opt,name=reporting_node_type,json=reportingNodeType,proto3" json:"reportingNodeType,omitempty"`
	// The pool that this node belongs to, this is used for scheduling purposes
	Pool                        string               `protobuf:"bytes,18,opt,name=pool,proto3" json:"pool,omitempty"`
	ResourceUsageByQueueAndPool []*PoolQueueResource `` /* 146-byte string literal not displayed */
}

Node represents a node in a worker cluster.

func (*Node) AvailableArmadaResource added in v0.3.66

func (node *Node) AvailableArmadaResource() ResourceList

func (*Node) Descriptor

func (*Node) Descriptor() ([]byte, []int)

func (*Node) GetAllocatableByPriorityAndResource deprecated

func (m *Node) GetAllocatableByPriorityAndResource() map[int32]ResourceList

Deprecated: Do not use.

func (*Node) GetExecutor added in v0.3.81

func (m *Node) GetExecutor() string

func (*Node) GetId

func (m *Node) GetId() string

func (*Node) GetLabels

func (m *Node) GetLabels() map[string]string

func (*Node) GetLastSeen

func (m *Node) GetLastSeen() *types.Timestamp

func (*Node) GetName added in v0.3.50

func (m *Node) GetName() string

func (*Node) GetPool added in v0.9.0

func (m *Node) GetPool() string

func (*Node) GetReportingNodeType added in v0.3.66

func (m *Node) GetReportingNodeType() string

func (*Node) GetResourceUsageByQueueAndPool added in v0.14.0

func (m *Node) GetResourceUsageByQueueAndPool() []*PoolQueueResource

func (*Node) GetStateByJobRunId added in v0.3.54

func (m *Node) GetStateByJobRunId() map[string]JobRunState

func (*Node) GetTaints

func (m *Node) GetTaints() []*v1.Taint

func (*Node) GetTotalResources

func (m *Node) GetTotalResources() ResourceList

func (*Node) GetUnallocatableResources added in v0.14.0

func (m *Node) GetUnallocatableResources() map[int32]ResourceList

func (*Node) GetUnschedulable added in v0.3.65

func (m *Node) GetUnschedulable() bool

func (*Node) Marshal

func (m *Node) Marshal() (dAtA []byte, err error)

func (*Node) MarshalTo

func (m *Node) MarshalTo(dAtA []byte) (int, error)

func (*Node) MarshalToSizedBuffer

func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

func (m *Node) Size() (n int)

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

func (m *Node) Unmarshal(dAtA []byte) error

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

type ObjectRequirements

type ObjectRequirements struct {
	// Types that are valid to be assigned to Requirements:
	//	*ObjectRequirements_PodRequirements
	Requirements isObjectRequirements_Requirements `protobuf_oneof:"requirements"`
}

Message capturing the scheduling requirements of a particular Kubernetes object.

func (*ObjectRequirements) Descriptor

func (*ObjectRequirements) Descriptor() ([]byte, []int)

func (*ObjectRequirements) GetPodRequirements

func (m *ObjectRequirements) GetPodRequirements() *PodRequirements

func (*ObjectRequirements) GetRequirements

func (m *ObjectRequirements) GetRequirements() isObjectRequirements_Requirements

func (*ObjectRequirements) Marshal

func (m *ObjectRequirements) Marshal() (dAtA []byte, err error)

func (*ObjectRequirements) MarshalTo

func (m *ObjectRequirements) MarshalTo(dAtA []byte) (int, error)

func (*ObjectRequirements) MarshalToSizedBuffer

func (m *ObjectRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ObjectRequirements) ProtoMessage

func (*ObjectRequirements) ProtoMessage()

func (*ObjectRequirements) Reset

func (m *ObjectRequirements) Reset()

func (*ObjectRequirements) Size

func (m *ObjectRequirements) Size() (n int)

func (*ObjectRequirements) String

func (m *ObjectRequirements) String() string

func (*ObjectRequirements) Unmarshal

func (m *ObjectRequirements) Unmarshal(dAtA []byte) error

func (*ObjectRequirements) XXX_DiscardUnknown

func (m *ObjectRequirements) XXX_DiscardUnknown()

func (*ObjectRequirements) XXX_Marshal

func (m *ObjectRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ObjectRequirements) XXX_Merge

func (m *ObjectRequirements) XXX_Merge(src proto.Message)

func (*ObjectRequirements) XXX_OneofWrappers

func (*ObjectRequirements) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*ObjectRequirements) XXX_Size

func (m *ObjectRequirements) XXX_Size() int

func (*ObjectRequirements) XXX_Unmarshal

func (m *ObjectRequirements) XXX_Unmarshal(b []byte) error

type ObjectRequirements_PodRequirements

type ObjectRequirements_PodRequirements struct {
	PodRequirements *PodRequirements `protobuf:"bytes,1,opt,name=podRequirements,proto3,oneof" json:"podRequirements,omitempty"`
}

func (*ObjectRequirements_PodRequirements) MarshalTo

func (m *ObjectRequirements_PodRequirements) MarshalTo(dAtA []byte) (int, error)

func (*ObjectRequirements_PodRequirements) MarshalToSizedBuffer

func (m *ObjectRequirements_PodRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ObjectRequirements_PodRequirements) Size

type PodRequirements

type PodRequirements struct {
	// Kubernetes node selector.
	NodeSelector map[string]string `` /* 165-byte string literal not displayed */
	// Kubernetes scheduling requirements.
	Affinity *v1.Affinity `protobuf:"bytes,2,opt,name=affinity,proto3" json:"affinity,omitempty"`
	// Kubernetes tolerations.
	Tolerations []*v1.Toleration `protobuf:"bytes,3,rep,name=tolerations,proto3" json:"tolerations,omitempty"`
	// Kubernetes annotations. Included here since we use annotations with special meaning.
	Annotations map[string]string `` /* 163-byte string literal not displayed */
	// One of Never, PreemptLowerPriority.
	// Defaults to PreemptLowerPriority if unset.
	PreemptionPolicy string `protobuf:"bytes,5,opt,name=preemptionPolicy,proto3" json:"preemptionPolicy,omitempty"`
	// Sum of the resource requirements for all containers that make up this pod.
	ResourceRequirements *v1.ResourceRequirements `protobuf:"bytes,6,opt,name=resourceRequirements,proto3" json:"resourceRequirements,omitempty"`
}

Captures the scheduling requirements of a pod.

func (*PodRequirements) Descriptor

func (*PodRequirements) Descriptor() ([]byte, []int)

func (*PodRequirements) GetAffinity

func (m *PodRequirements) GetAffinity() *v1.Affinity

func (*PodRequirements) GetAnnotations

func (m *PodRequirements) GetAnnotations() map[string]string

func (*PodRequirements) GetNodeSelector

func (m *PodRequirements) GetNodeSelector() map[string]string

func (*PodRequirements) GetPreemptionPolicy

func (m *PodRequirements) GetPreemptionPolicy() string

func (*PodRequirements) GetResourceRequirements

func (m *PodRequirements) GetResourceRequirements() *v1.ResourceRequirements

func (*PodRequirements) GetTolerations

func (m *PodRequirements) GetTolerations() []*v1.Toleration

func (*PodRequirements) Marshal

func (m *PodRequirements) Marshal() (dAtA []byte, err error)

func (*PodRequirements) MarshalTo

func (m *PodRequirements) MarshalTo(dAtA []byte) (int, error)

func (*PodRequirements) MarshalToSizedBuffer

func (m *PodRequirements) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PodRequirements) ProtoMessage

func (*PodRequirements) ProtoMessage()

func (*PodRequirements) Reset

func (m *PodRequirements) Reset()

func (*PodRequirements) Size

func (m *PodRequirements) Size() (n int)

func (*PodRequirements) String

func (m *PodRequirements) String() string

func (*PodRequirements) Unmarshal

func (m *PodRequirements) Unmarshal(dAtA []byte) error

func (*PodRequirements) XXX_DiscardUnknown

func (m *PodRequirements) XXX_DiscardUnknown()

func (*PodRequirements) XXX_Marshal

func (m *PodRequirements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PodRequirements) XXX_Merge

func (m *PodRequirements) XXX_Merge(src proto.Message)

func (*PodRequirements) XXX_Size

func (m *PodRequirements) XXX_Size() int

func (*PodRequirements) XXX_Unmarshal

func (m *PodRequirements) XXX_Unmarshal(b []byte) error

type PoolQueueResource added in v0.14.0

type PoolQueueResource struct {
	Pool      string        `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"`
	Queue     string        `protobuf:"bytes,2,opt,name=queue,proto3" json:"queue,omitempty"`
	Resources *ResourceList `protobuf:"bytes,3,opt,name=resources,proto3" json:"resources,omitempty"`
}

func (*PoolQueueResource) Descriptor added in v0.14.0

func (*PoolQueueResource) Descriptor() ([]byte, []int)

func (*PoolQueueResource) GetPool added in v0.14.0

func (m *PoolQueueResource) GetPool() string

func (*PoolQueueResource) GetQueue added in v0.14.0

func (m *PoolQueueResource) GetQueue() string

func (*PoolQueueResource) GetResources added in v0.14.0

func (m *PoolQueueResource) GetResources() *ResourceList

func (*PoolQueueResource) Marshal added in v0.14.0

func (m *PoolQueueResource) Marshal() (dAtA []byte, err error)

func (*PoolQueueResource) MarshalTo added in v0.14.0

func (m *PoolQueueResource) MarshalTo(dAtA []byte) (int, error)

func (*PoolQueueResource) MarshalToSizedBuffer added in v0.14.0

func (m *PoolQueueResource) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PoolQueueResource) ProtoMessage added in v0.14.0

func (*PoolQueueResource) ProtoMessage()

func (*PoolQueueResource) Reset added in v0.14.0

func (m *PoolQueueResource) Reset()

func (*PoolQueueResource) Size added in v0.14.0

func (m *PoolQueueResource) Size() (n int)

func (*PoolQueueResource) String added in v0.14.0

func (m *PoolQueueResource) String() string

func (*PoolQueueResource) Unmarshal added in v0.14.0

func (m *PoolQueueResource) Unmarshal(dAtA []byte) error

func (*PoolQueueResource) XXX_DiscardUnknown added in v0.14.0

func (m *PoolQueueResource) XXX_DiscardUnknown()

func (*PoolQueueResource) XXX_Marshal added in v0.14.0

func (m *PoolQueueResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PoolQueueResource) XXX_Merge added in v0.14.0

func (m *PoolQueueResource) XXX_Merge(src proto.Message)

func (*PoolQueueResource) XXX_Size added in v0.14.0

func (m *PoolQueueResource) XXX_Size() int

func (*PoolQueueResource) XXX_Unmarshal added in v0.14.0

func (m *PoolQueueResource) XXX_Unmarshal(b []byte) error

type QuantityByTAndResourceType added in v0.3.76

type QuantityByTAndResourceType[T comparable] map[T]ResourceList

func (QuantityByTAndResourceType[T]) AddResourceList added in v0.3.76

func (a QuantityByTAndResourceType[T]) AddResourceList(t T, rlb ResourceList)

func (QuantityByTAndResourceType[T]) AggregateByResource added in v0.3.76

func (a QuantityByTAndResourceType[T]) AggregateByResource() ResourceList

func (QuantityByTAndResourceType[T]) MaxAggregatedByResource added in v0.3.76

func (a QuantityByTAndResourceType[T]) MaxAggregatedByResource(t T, rl ResourceList)

MaxAggregatedByResource updates a in-place such that for each resource type t a[p1][t] + ... + a[pn][t] = max(a[p1][t] + ... + a[pn][t], rl[t]), where p1, ..., pn are the priorities in a, for each resource set explicitly in rl.

If necessary to add resources to make up the difference, those resources are added at priority p.

type ResourceList

type ResourceList struct {
	Resources map[string]resource.Quantity `` /* 149-byte string literal not displayed */
}

func NewResourceList added in v0.3.70

func NewResourceList(n int) ResourceList

NewResourceList returns a new ResourceList, where the backing map has initial capacity n.

func NewResourceListWithDefaultSize added in v0.3.70

func NewResourceListWithDefaultSize() ResourceList

NewResourceListWithDefaultSize returns a new ResourceList, where the backing map has default initial capacity.

func ResourceListFromV1ResourceList

func ResourceListFromV1ResourceList(rl v1.ResourceList) ResourceList

func (*ResourceList) Add

func (a *ResourceList) Add(b ResourceList)

func (*ResourceList) AddQuantity added in v0.3.63

func (rl *ResourceList) AddQuantity(resourceType string, quantity resource.Quantity)

func (*ResourceList) AddV1ResourceList added in v0.3.70

func (a *ResourceList) AddV1ResourceList(b v1.ResourceList)

func (ResourceList) DeepCopy

func (rl ResourceList) DeepCopy() ResourceList

func (*ResourceList) Descriptor

func (*ResourceList) Descriptor() ([]byte, []int)

func (ResourceList) Equal

func (a ResourceList) Equal(b ResourceList) bool

func (*ResourceList) Get

func (rl *ResourceList) Get(resourceType string) resource.Quantity

func (*ResourceList) GetResources

func (m *ResourceList) GetResources() map[string]resource.Quantity

func (*ResourceList) Marshal

func (m *ResourceList) Marshal() (dAtA []byte, err error)

func (*ResourceList) MarshalTo

func (m *ResourceList) MarshalTo(dAtA []byte) (int, error)

func (*ResourceList) MarshalToSizedBuffer

func (m *ResourceList) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResourceList) ProtoMessage

func (*ResourceList) ProtoMessage()

func (*ResourceList) Reset

func (m *ResourceList) Reset()

func (*ResourceList) Set added in v0.3.70

func (rl *ResourceList) Set(t string, q resource.Quantity)

func (*ResourceList) Size

func (m *ResourceList) Size() (n int)

func (*ResourceList) String

func (m *ResourceList) String() string

func (*ResourceList) Sub

func (a *ResourceList) Sub(b ResourceList)

func (*ResourceList) SubV1ResourceList added in v0.3.70

func (a *ResourceList) SubV1ResourceList(b v1.ResourceList)

func (*ResourceList) Unmarshal

func (m *ResourceList) Unmarshal(dAtA []byte) error

func (*ResourceList) XXX_DiscardUnknown

func (m *ResourceList) XXX_DiscardUnknown()

func (*ResourceList) XXX_Marshal

func (m *ResourceList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ResourceList) XXX_Merge

func (m *ResourceList) XXX_Merge(src proto.Message)

func (*ResourceList) XXX_Size

func (m *ResourceList) XXX_Size() int

func (*ResourceList) XXX_Unmarshal

func (m *ResourceList) XXX_Unmarshal(b []byte) error

func (ResourceList) Zero added in v0.3.70

func (rl ResourceList) Zero()

Zero zeroes out rl in-place, such that all quantities have value 0.

Jump to

Keyboard shortcuts

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