resources

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResourceQuantity

func ResourceQuantity(name corev1.ResourceName, v int64) resource.Quantity

func ResourceQuantityString added in v0.8.4

func ResourceQuantityString(name corev1.ResourceName, v int64) string

func ResourceValue

func ResourceValue(name corev1.ResourceName, q resource.Quantity) int64

ResourceValue returns the integer value for the resource name. It's milli-units for CPU and absolute units for everything else.

Types

type FlavorResource

type FlavorResource struct {
	Flavor   kueue.ResourceFlavorReference
	Resource corev1.ResourceName
}

type FlavorResourceQuantities

type FlavorResourceQuantities map[FlavorResource]int64

type Requests

type Requests map[corev1.ResourceName]int64

Requests maps ResourceName to flavor to value; for CPU it is tracked in MilliCPU.

func NewRequests

func NewRequests(rl corev1.ResourceList) Requests

func (Requests) Add added in v0.9.0

func (r Requests) Add(addRequests Requests)

func (Requests) Clone added in v0.9.0

func (r Requests) Clone() Requests

func (Requests) CountIn added in v0.9.0

func (req Requests) CountIn(capacity Requests) int32

func (Requests) Divide added in v0.9.0

func (r Requests) Divide(f int64)

func (Requests) Sub added in v0.9.0

func (r Requests) Sub(subRequests Requests)

func (Requests) ToResourceList

func (r Requests) ToResourceList() corev1.ResourceList

Jump to

Keyboard shortcuts

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