package manager

import "github.com/opencontainers/cgroups/manager"

Index

Functions

func New

func New(config *cgroups.Cgroup) (cgroups.Manager, error)

New returns the instance of a cgroup manager, which is chosen based on the local environment (whether cgroup v1 or v2 is used) and the config (whether config.Systemd is set or not).

func NewWithPaths

func NewWithPaths(config *cgroups.Cgroup, paths map[string]string) (cgroups.Manager, error)

NewWithPaths is similar to New, and can be used in case cgroup paths are already well known, which can save some resources.

For cgroup v1, the keys are controller/subsystem name, and the values are absolute filesystem paths to the appropriate cgroups.

For cgroup v2, the only key allowed is "" (empty string), and the value is the unified cgroup path.

Source Files

new.go

Version
v0.0.1 (latest)
Published
Feb 28, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
1 month ago

Tools for package owners.