Versions in this module Expand all Collapse all v3 v3.0.3 Dec 29, 2023 Changes in this version type Manager + func (c *Manager) Threads(recursive bool) ([]uint64, error) v3.0.2 Jun 20, 2023 Changes in this version + type CgroupType string + const Domain + const Threaded type Manager + func (c *Manager) GetType() (CgroupType, error) + func (c *Manager) SetType(cgType CgroupType) error v3.0.1 Jan 30, 2023 v3.0.0 Jan 9, 2023 Changes in this version + var ErrInvalidFormat = errors.New("cgroups: parsing file with invalid format failed") + var ErrInvalidGroupPath = errors.New("cgroups: invalid group path") + func DeviceFilter(devices []specs.LinuxDeviceCgroup) (asm.Instructions, string, 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 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 InitConfig struct + type InitOpts func(c *InitConfig) error + func WithMountpoint(path string) InitOpts + type Manager struct + func Load(group string, opts ...InitOpts) (*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) AddThread(tid 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) Kill() error + func (c *Manager) MemoryEventFD() (int, uint32, error) + func (c *Manager) MoveTo(destination *Manager) 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 + func (c *Manager) Update(resources *Resources) error + type Memory struct + High *int64 + Low *int64 + Max *int64 + Min *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