kubernetes

package module
v0.0.0-...-bdc96a6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PodAndContainerIDNotFoundError = errors.Sentinel("could not find pod or container id")

Functions

func GetContainerIDFromCgroups

func GetContainerIDFromCgroups(cgroups []Cgroup) string

func New

func New(opts ...CollectorOption) metadatax.Collector

Types

type Cgroup

type Cgroup = procfs.Cgroup

func GetCgroupsForPID

func GetCgroupsForPID(pid int) ([]Cgroup, error)

type CollectorOption

type CollectorOption func(*collector)

func CollectorWithMetadataContainerInitFunc

func CollectorWithMetadataContainerInitFunc(fn func() metadatax.MetadataContainer) CollectorOption

func WithKubeletClient

func WithKubeletClient(client kubelet.Client) CollectorOption

func WithPodResolver

func WithPodResolver(resolver PodResolver) CollectorOption

type PodResolver

type PodResolver interface {
	GetPodAndContainerID(pid int32) (string, string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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