Documentation
¶
Index ¶
- func ContainerDeviceProcInfoFunc(procInfos procInfoList, containerPids []uint32, f func(nvml.ProcessInfo_v1))
- func ContainerDeviceProcUtilFunc(procUtils procUtilList, containerPids []uint32, ...)
- func ContainerPidsFunc(pod *corev1.Pod, containerName string, fullPath func(string) string, ...)
- func FlattenDevicesFunc(podDevices device.PodDevices, f func(claimDevice device.ClaimDevice))
- func GetNodeInformer(factory informers.SharedInformerFactory, nodeName string) cache.SharedIndexInformer
- func GetPodInformer(factory informers.SharedInformerFactory, nodeName string) cache.SharedIndexInformer
- func NewServer(registry *prometheus.Registry, port int) *server
- type CollectorService
- type ContainerKey
- type ContainerLister
- type ResourceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerDeviceProcInfoFunc ¶
func ContainerDeviceProcInfoFunc(procInfos procInfoList, containerPids []uint32, f func(nvml.ProcessInfo_v1))
func ContainerDeviceProcUtilFunc ¶
func ContainerDeviceProcUtilFunc(procUtils procUtilList, containerPids []uint32, f func(nvml.ProcessUtilizationSample))
func ContainerPidsFunc ¶
func FlattenDevicesFunc ¶
func FlattenDevicesFunc(podDevices device.PodDevices, f func(claimDevice device.ClaimDevice))
func GetNodeInformer ¶
func GetNodeInformer(factory informers.SharedInformerFactory, nodeName string) cache.SharedIndexInformer
func GetPodInformer ¶
func GetPodInformer(factory informers.SharedInformerFactory, nodeName string) cache.SharedIndexInformer
func NewServer ¶
func NewServer(registry *prometheus.Registry, port int) *server
Types ¶
type CollectorService ¶
type CollectorService interface {
prometheus.Collector
Registry() *prometheus.Registry
}
func NewNodeGPUCollector ¶
func NewNodeGPUCollector(nodeName string, nodeLister listerv1.NodeLister, podLister listerv1.PodLister, contLister *ContainerLister) (CollectorService, error)
type ContainerKey ¶
type ContainerKey string
func GetContainerKey ¶
func GetContainerKey(uid types.UID, containerName string) ContainerKey
func (ContainerKey) SpiltUIDAndContainerName ¶
func (key ContainerKey) SpiltUIDAndContainerName() (types.UID, string)
type ContainerLister ¶
type ContainerLister struct {
// contains filtered or unexported fields
}
func NewContainerLister ¶
func NewContainerLister(basePath, nodeName string, podLister listerv1.PodLister) *ContainerLister
func (*ContainerLister) GetResourceData ¶
func (c *ContainerLister) GetResourceData(key ContainerKey) (*vgpu.ResourceDataT, bool)
func (*ContainerLister) Start ¶
func (c *ContainerLister) Start(interval time.Duration, stopChan <-chan struct{})
type ResourceConfig ¶
type ResourceConfig struct {
DataBytes []byte
ResourceData *vgpu.ResourceDataT
}
Click to show internal directories.
Click to hide internal directories.