Versions in this module Expand all Collapse all v1 v1.0.2 Jul 2, 2021 Changes in this version + var ErrCPUNotSupported = errors.New("cgroups: cpu cgroup (v2) not supported on this system") + var ErrCgroupDeleted = errors.New("cgroups: cgroup deleted") + var ErrFreezerNotSupported = errors.New("cgroups: freezer cgroup (v2) not supported on this system") + var ErrInvalidFormat = errors.New("cgroups: parsing file with invalid format failed") + var ErrInvalidGroupPath = errors.New("cgroups: invalid group path") + var ErrInvalidPid = errors.New("cgroups: pid must be greater than 0") + var ErrMemoryNotSupported = errors.New("cgroups: memory cgroup (v2) not supported on this system") + var ErrMountPointNotExist = errors.New("cgroups: cgroup mountpoint does not exist") + var ErrNoCgroupMountDestination = errors.New("cgroups: cannot find cgroup mount destination") + var ErrPidsNotSupported = errors.New("cgroups: pids cgroup (v2) not supported on this system") + func DeviceFilter(devices []specs.LinuxDeviceCgroup) (asm.Instructions, string, error) + func IgnoreNotExist(err error) error + func LoadAttachCgroupDeviceFilter(insts asm.Instructions, license string, dirFD int) (func() error, error) + func NestedGroupPath(suffix string) (string, error) + func PidGroupPath(pid int) (string, error) + func VerifyGroupPath(g string) error + type BFQ struct + Weight uint16 + type CPU struct + Cpus string + Max CPUMax + Mems string + Weight *uint64 + func (r *CPU) Values() (o []Value) + type CPUMax string + func NewCPUMax(quota *int64, period *uint64) CPUMax + type ControllerToggle int + const Disable + const Enable + type Entry struct + Major int64 + Minor int64 + Rate uint64 + Type IOType + func (e Entry) String() string + type ErrorHandler func(err error) error + type Event struct + High uint64 + Low uint64 + Max uint64 + OOM uint64 + OOMKill uint64 + type HugeTlb []HugeTlbEntry + func (r *HugeTlb) Values() (o []Value) + type HugeTlbEntry struct + HugePageSize string + Limit uint64 + type IO struct + BFQ BFQ + Max []Entry + func (i *IO) Values() (o []Value) + type IOType string + const ReadBPS + const ReadIOPS + const WriteBPS + const WriteIOPS + type Manager struct + func LoadManager(mountpoint string, group string) (*Manager, error) + func LoadSystemd(slice, group string) (*Manager, error) + func NewManager(mountpoint string, group string, resources *Resources) (*Manager, error) + func NewSystemd(slice, group string, pid int, resources *Resources) (*Manager, error) + func (c *Manager) AddProc(pid uint64) error + func (c *Manager) Controllers() ([]string, error) + func (c *Manager) Delete() error + func (c *Manager) DeleteSystemd() error + func (c *Manager) EventChan() (<-chan Event, <-chan error) + func (c *Manager) Freeze() error + func (c *Manager) MemoryEventFD() (int, uint32, error) + func (c *Manager) NewChild(name string, resources *Resources) (*Manager, error) + func (c *Manager) Procs(recursive bool) ([]uint64, error) + func (c *Manager) RootControllers() ([]string, error) + func (c *Manager) Stat() (*stats.Metrics, error) + func (c *Manager) Thaw() error + func (c *Manager) ToggleControllers(controllers []string, t ControllerToggle) error + type Memory struct + High *int64 + Low *int64 + Max *int64 + Swap *int64 + func (r *Memory) Values() (o []Value) + type Pids struct + Max int64 + func (r *Pids) Values() (o []Value) + type RDMA struct + Limit []RDMAEntry + func (r *RDMA) Values() (o []Value) + type RDMAEntry struct + Device string + HcaHandles uint32 + HcaObjects uint32 + func (r RDMAEntry) String() string + type Resources struct + CPU *CPU + Devices []specs.LinuxDeviceCgroup + HugeTlb *HugeTlb + IO *IO + Memory *Memory + Pids *Pids + RDMA *RDMA + func ToResources(spec *specs.LinuxResources) *Resources + func (r *Resources) EnabledControllers() (c []string) + func (r *Resources) Values() (o []Value) + type State string + const Deleted + const Frozen + const Thawed + const Unknown + func (s State) Values() []Value + type Value struct v1.0.2-testing1 Jul 2, 2021 v1.0.2-testing Jul 2, 2021