collectors

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetV1Client

func GetV1Client(socket string, connectionTimeout time.Duration, maxMsgSize int) (v1.PodResourcesListerClient, *grpc.ClientConn, error)

GetV1Client returns a client for the PodResourcesLister grpc service Extracted from package k8s.io/kubernetes/pkg/kubelet/apis/podresources client.go v1.24.3 This is what is recommended for consumers of this package

func PodResources

func PodResources() []*v1.PodResources

PodResources uses the kubernetes kubelet api to get information about the devices and the pods they are attached to. We create and close a new connection here on each run. The performance impact of this seems marginal - but sharing a connection might save cpu time

func ResolveFilepaths

func ResolveFilepaths() error

Types

type SriovCollector

type SriovCollector []prometheus.Collector

SriovCollector registers the collectors used for specific data and exposes a Collect method to gather the data

func Enabled

func Enabled() SriovCollector

Enabled adds collectors enabled by default or command line flag to an SriovCollector object

func (SriovCollector) Collect

func (s SriovCollector) Collect(ch chan<- prometheus.Metric)

Collect metrics from all enabled collectors in unordered sequence.

func (SriovCollector) Describe

func (s SriovCollector) Describe(ch chan<- *prometheus.Desc)

Describe each collector in unordered sequence

Jump to

Keyboard shortcuts

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