controller

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectInventoryK8S

func CollectInventoryK8S(ctx context.Context, r client.Client) (map[string]map[string]AcceleratorModelInfo, error)

CollectInventory lists all Nodes and builds a map[nodeName][model]→info. It checks labels <vendor>/gpu.product, <vendor>/gpu.memory and capacity <vendor>/gpu.

func FixValue

func FixValue(x *float64)

Helper to handle if a value is NaN or infinite

Types

type AcceleratorModelInfo

type AcceleratorModelInfo struct {
	Count  int
	Memory string
}

type MetricKV

type MetricKV struct {
	Name   string
	Labels map[string]string
	Value  float64
}

Jump to

Keyboard shortcuts

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