Documentation ¶
Index ¶
- type ClusterState
- func (c *ClusterState) DeleteNode(name string)
- func (c *ClusterState) DeletePod(namespacedName types.NamespacedName) error
- func (c *ClusterState) GetNode(nodeName string) (framework.NodeInfo, bool)
- func (c *ClusterState) GetNodes() map[string]framework.NodeInfo
- func (c *ClusterState) IsPartitioningEnabled(kind gpu.PartitioningKind) bool
- func (c *ClusterState) UpdateNode(node v1.Node, pods []v1.Pod)
- func (c *ClusterState) UpdateUsage(pod v1.Pod)
- type GPUPartitioning
- type NodePartitioning
- type PartitioningState
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) 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
Click to show internal directories.
Click to hide internal directories.