Versions in this module Expand all Collapse all v0 v0.62.1 Feb 14, 2025 Changes in this version + const Blkio — linux/amd64 + const CPU — linux/amd64 + const CPUAcct — linux/amd64 + const CPUset — linux/amd64 + const Memory — linux/amd64 + const Pids — linux/amd64 + var ErrCgroupDeleted = errors.New("cgroup deleted") — linux/amd64 + var ErrCgroupV1Rootless = errors.New("no support for CGroups V1 in rootless environments") — linux/amd64 + var ErrStatCgroup = errors.New("no cgroup available for gathering user statistics") — linux/amd64 + var TestMode bool — linux/amd64 + func AvailableControllers(exclude map[string]controllerHandler, cgroup2 bool) ([]string, error) — linux/amd64 + func BlkioFiles(cgroupPath string) (wtFile, wtDevFile string) — linux/amd64 + func GetCgroupProcess(pid int) (string, error) — linux/amd64 + func GetOwnCgroup() (string, error) — linux/amd64 + func GetOwnCgroupDisallowRoot() (string, error) — linux/amd64 + func IsCgroup2UnifiedMode() (bool, error) + func MaybeMoveToSubCgroup() error — linux/amd64 + func MoveUnderCgroup(cgroup, subtree string, processes []uint32) error — linux/amd64 + func MoveUnderCgroupSubtree(subtree string) error — linux/amd64 + func OpenFile(dir, file string, flags int) (*os.File, error) — linux/amd64 + func ReadFile(dir, file string) (string, error) — linux/amd64 + func SetBlkioThrottle(res *configs.Resources, cgroupPath string) error — linux/amd64 + func SystemCPUUsage() (uint64, error) — linux/amd64 + func UserConnection(uid int) (*systemdDbus.Conn, error) — linux/amd64 + func UserOwnsCurrentSystemdCgroup() (bool, error) + func WriteFile(dir, file, data string) error — linux/amd64 + type BlkioDev struct — linux/amd64 + Bytes uint64 + Device string + type CgroupControl struct — linux/amd64 + func Load(path string) (*CgroupControl, error) + func New(path string, resources *configs.Resources) (*CgroupControl, error) + func NewSystemd(path string, resources *configs.Resources) (*CgroupControl, error) + func (c *CgroupControl) AddPid(pid int) error + func (c *CgroupControl) CreateSystemdUnit(path string) error + func (c *CgroupControl) CreateSystemdUserUnit(path string, uid int) error + func (c *CgroupControl) Delete() error + func (c *CgroupControl) DeleteByPath(path string) error + func (c *CgroupControl) DeleteByPathConn(path string, conn *systemdDbus.Conn) error + func (c *CgroupControl) Stat() (*cgroups.Stats, error) + func (c *CgroupControl) Update(resources *configs.Resources) error