Documentation ¶
Index ¶
- func AddGroupResource(list types.ResourceList, key string, val int64)
- func IsEnumResource(res types.ResourceName) bool
- func IsGroupResourceName(name types.ResourceName) bool
- func PrecheckedResource(constraint types.ResourceName) bool
- func TranslateResource(nodeResources types.ResourceList, containerRequests types.ResourceList, ...) (bool, types.ResourceList)
- type InsufficientResourceError
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 (e *InsufficientResourceError) GetInfo() (types.ResourceName, int64, int64, int64)
func (*InsufficientResourceError) GetReason ¶
func (e *InsufficientResourceError) GetReason() string
Click to show internal directories.
Click to hide internal directories.