containerutils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CgroupPathV2AddMountpoint

func CgroupPathV2AddMountpoint(path string) (string, error)

func GetCgroupID

func GetCgroupID(pathWithMountpoint string) (uint64, error)

GetCgroupID returns the cgroup2 ID of a path.

func GetCgroupPaths

func GetCgroupPaths(pid int) (string, string, error)

GetCgroup2Path returns the cgroup1 and cgroup2 paths of a process. It does not include the "/sys/fs/cgroup/{unified,systemd,}" prefix.

func GetMntNs

func GetMntNs(pid int) (uint64, error)

func ParseOCIState

func ParseOCIState(stateBuf []byte) (id string, pid int, err error)

Types

type CRIClient

type CRIClient interface {
	Close() error
	PidFromContainerId(containerID string) (int, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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