package cgroups
import "github.com/opencontainers/runc/libcontainer/cgroups"
Index ¶
- Constants
- Variables
- func FindCgroupMountpoint(cgroupPath, subsystem string) (string, error)
- func FindCgroupMountpointAndRoot(cgroupPath, subsystem string) (string, string, error)
- func GetInitCgroup(subsystem string) (string, error)
- func GetInitCgroupPath(subsystem string) (string, error)
- func GetOwnCgroup(subsystem string) (string, error)
- func GetOwnCgroupPath(subsystem string) (string, error)
- func IsNotFound(err error) bool
- func NewNotFoundError(sub string) error
- func OpenFile(dir, file string, flags int) (*os.File, error)
- func ReadFile(dir, file string) (string, error)
- func WriteFile(dir, file, data string) error
- type NotFoundError
Constants ¶
const (
CgroupNamePrefix = "name="
)
Variables ¶
var ( // TestMode is set to true by unit tests that need "fake" cgroupfs. TestMode bool )
Functions ¶
func FindCgroupMountpoint ¶
https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt
func FindCgroupMountpointAndRoot ¶
func GetInitCgroup ¶
func GetInitCgroupPath ¶
func GetOwnCgroup ¶
GetOwnCgroup returns the relative path to the cgroup docker is running in.
func GetOwnCgroupPath ¶
func IsNotFound ¶
func NewNotFoundError ¶
func OpenFile ¶
OpenFile opens a cgroup file in a given dir with given flags. It is supposed to be used for cgroup files only.
func ReadFile ¶
ReadFile reads data from a cgroup file in dir. It is supposed to be used for cgroup files only.
func WriteFile ¶
WriteFile writes data to a cgroup file in dir. It is supposed to be used for cgroup files only.
Types ¶
type NotFoundError ¶
type NotFoundError struct { Subsystem string }
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Source Files ¶
cgroups_unsupported.go file.go v1_utils.go
Directories ¶
Path | Synopsis |
---|---|
libcontainer/cgroups/devices | |
libcontainer/cgroups/ebpf | |
libcontainer/cgroups/ebpf/devicefilter | Package devicefilter contains eBPF device filter program |
libcontainer/cgroups/fs | |
libcontainer/cgroups/fs2 | |
libcontainer/cgroups/systemd |
- Version
- v1.0.0
- Published
- Jun 17, 2021
- Platform
- js/wasm
- Imports
- 13 packages
- Last checked
- 3 hours ago –
Tools for package owners.