resource

package
v0.0.0-...-302a361 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGroupResource

func AddGroupResource(list types.ResourceList, key string, val int64)

func IsEnumResource

func IsEnumResource(res types.ResourceName) bool

IsEnumResource returns true if resource name is an "enum" resource

func IsGroupResourceName

func IsGroupResourceName(name types.ResourceName) bool

IsGroupResourceName returns true if the resource name has the group resource prefix

func PrecheckedResource

func PrecheckedResource(constraint types.ResourceName) bool

func TranslateResource

func TranslateResource(nodeResources types.ResourceList, containerRequests types.ResourceList,
	thisStage string, nextStage string) (bool, types.ResourceList)

Resource translation to max level specified in nodeInfo TranslateResource translates resources to next level

Types

type InsufficientResourceError

type InsufficientResourceError struct {
	// resourceName is the name of the resource that is insufficient
	ResourceName types.ResourceName
	// contains filtered or unexported fields
}

InsufficientResourceError is an error type that indicates what kind of resource limit is hit and caused the unfitting failure.

func NewInsufficientResourceError

func NewInsufficientResourceError(resourceName types.ResourceName, requested, used, capacity int64) *InsufficientResourceError

func (*InsufficientResourceError) GetInfo

func (*InsufficientResourceError) GetReason

func (e *InsufficientResourceError) GetReason() string

Jump to

Keyboard shortcuts

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