state

package
v0.0.0-...-12e0a72 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterState

type ClusterState struct {
	// contains filtered or unexported fields
}

func NewClusterState

func NewClusterState(nodes map[string]framework.NodeInfo) *ClusterState

func NewEmptyClusterState

func NewEmptyClusterState() *ClusterState

func (*ClusterState) DeleteNode

func (c *ClusterState) DeleteNode(name string)

func (*ClusterState) DeletePod

func (c *ClusterState) DeletePod(namespacedName types.NamespacedName) error

func (*ClusterState) GetNode

func (c *ClusterState) GetNode(nodeName string) (framework.NodeInfo, bool)

func (*ClusterState) GetNodes

func (c *ClusterState) GetNodes() map[string]framework.NodeInfo

func (*ClusterState) IsPartitioningEnabled

func (c *ClusterState) IsPartitioningEnabled(kind gpu.PartitioningKind) bool

IsPartitioningEnabled returns true if there is at least one node enabled for the provided kind of GPU partitioning

func (*ClusterState) UpdateNode

func (c *ClusterState) UpdateNode(node v1.Node, pods []v1.Pod)

func (*ClusterState) UpdateUsage

func (c *ClusterState) UpdateUsage(pod v1.Pod)

type GPUPartitioning

type GPUPartitioning struct {
	GPUIndex  int
	Resources map[v1.ResourceName]int
}

type NodePartitioning

type NodePartitioning struct {
	GPUs []GPUPartitioning
}

func (NodePartitioning) Equal

func (n NodePartitioning) Equal(other NodePartitioning) bool

type PartitioningState

type PartitioningState map[string]NodePartitioning

func (PartitioningState) Equal

func (p PartitioningState) Equal(other PartitioningState) bool

func (PartitioningState) IsEmpty

func (p PartitioningState) IsEmpty() bool

Jump to

Keyboard shortcuts

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