package cgroups

import "github.com/containerd/containerd/metrics/cgroups"

Index

Variables

var (
	// ErrAlreadyCollected is returned when a cgroups is already being monitored
	ErrAlreadyCollected = errors.New("cgroup is already being collected")
	// ErrCgroupNotExists is returns when a cgroup no longer exists
	ErrCgroupNotExists = errors.New("cgroup does not exist in the collector")
)

Functions

func New

func New(ic *plugin.InitContext) (interface{}, error)

New returns a new cgroups monitor

Types

type Config

type Config struct {
	NoPrometheus bool `toml:"no_prometheus"`
}

Config for the cgroups monitor

type Trigger

type Trigger func(string, string, cgroups.Cgroup)

Trigger will be called when an event happens and provides the cgroup where the event originated from

Source Files

blkio.go cgroups.go cpu.go hugetlb.go memory.go metric.go metrics.go oom.go pids.go

Version
v1.1.8
Published
Sep 26, 2019
Platform
linux/amd64
Imports
19 packages
Last checked
1 minute ago

Tools for package owners.