Documentation ¶
Index ¶
- Variables
- func CheckCpushares(path string, c uint64) error
- func EnableKernelMemoryAccounting(path string) error
- type BlkioGroup
- type CpuGroup
- func (s *CpuGroup) Apply(d *cgroupData) error
- func (s *CpuGroup) ApplyDir(path string, cgroup *configs.Cgroup, pid int) error
- func (s *CpuGroup) GetStats(path string, stats *cgroups.Stats) error
- func (s *CpuGroup) Name() string
- func (s *CpuGroup) Remove(d *cgroupData) error
- func (s *CpuGroup) Set(path string, cgroup *configs.Cgroup) error
- func (s *CpuGroup) SetRtSched(path string, cgroup *configs.Cgroup) error
- type CpuGroupV2
- func (s *CpuGroupV2) Apply(d *cgroupData) error
- func (s *CpuGroupV2) ApplyDir(path string, cgroup *configs.Cgroup, pid int) error
- func (s *CpuGroupV2) GetStats(path string, stats *cgroups.Stats) error
- func (s *CpuGroupV2) Name() string
- func (s *CpuGroupV2) Remove(d *cgroupData) error
- func (s *CpuGroupV2) Set(path string, cgroup *configs.Cgroup) error
- type CpuacctGroup
- type CpusetGroup
- func (s *CpusetGroup) Apply(d *cgroupData) error
- func (s *CpusetGroup) ApplyDir(dir string, cgroup *configs.Cgroup, pid int) error
- func (s *CpusetGroup) GetStats(path string, stats *cgroups.Stats) error
- func (s *CpusetGroup) Name() string
- func (s *CpusetGroup) Remove(d *cgroupData) error
- func (s *CpusetGroup) Set(path string, cgroup *configs.Cgroup) error
- type CpusetGroupV2
- func (s *CpusetGroupV2) Apply(d *cgroupData) error
- func (s *CpusetGroupV2) ApplyDir(dir string, cgroup *configs.Cgroup, pid int) error
- func (s *CpusetGroupV2) GetStats(path string, stats *cgroups.Stats) error
- func (s *CpusetGroupV2) Name() string
- func (s *CpusetGroupV2) Remove(d *cgroupData) error
- func (s *CpusetGroupV2) Set(path string, cgroup *configs.Cgroup) error
- type DevicesGroup
- type FreezerGroup
- type FreezerGroupV2
- type HugetlbGroup
- type IOGroupV2
- type Manager
- func (m *Manager) Apply(pid int) (err error)
- func (m *Manager) Destroy() error
- func (m *Manager) Freeze(state configs.FreezerState) error
- func (m *Manager) GetAllPids() ([]int, error)
- func (m *Manager) GetPaths() map[string]string
- func (m *Manager) GetPids() ([]int, error)
- func (m *Manager) GetStats() (*cgroups.Stats, error)
- func (m *Manager) Set(container *configs.Config) error
- type MemoryGroup
- type MemoryGroupV2
- type NameGroup
- type NetClsGroup
- type NetPrioGroup
- type PerfEventGroup
- type PidsGroup
- type PidsGroupV2
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotValidFormat = errors.New("line is not a valid key value format")
)
View Source
var (
HugePageSizes, _ = cgroups.GetHugePageSize()
)
Functions ¶
func CheckCpushares ¶
Types ¶
type BlkioGroup ¶
type BlkioGroup struct { }
func (*BlkioGroup) Apply ¶
func (s *BlkioGroup) Apply(d *cgroupData) error
func (*BlkioGroup) GetStats ¶
func (s *BlkioGroup) GetStats(path string, stats *cgroups.Stats) error
func (*BlkioGroup) Name ¶ added in v0.0.5
func (s *BlkioGroup) Name() string
func (*BlkioGroup) Remove ¶
func (s *BlkioGroup) Remove(d *cgroupData) error
type CpuGroupV2 ¶
type CpuGroupV2 struct { }
func (*CpuGroupV2) Apply ¶
func (s *CpuGroupV2) Apply(d *cgroupData) error
func (*CpuGroupV2) GetStats ¶
func (s *CpuGroupV2) GetStats(path string, stats *cgroups.Stats) error
func (*CpuGroupV2) Name ¶
func (s *CpuGroupV2) Name() string
func (*CpuGroupV2) Remove ¶
func (s *CpuGroupV2) Remove(d *cgroupData) error
type CpuacctGroup ¶
type CpuacctGroup struct { }
func (*CpuacctGroup) Apply ¶
func (s *CpuacctGroup) Apply(d *cgroupData) error
func (*CpuacctGroup) GetStats ¶
func (s *CpuacctGroup) GetStats(path string, stats *cgroups.Stats) error
func (*CpuacctGroup) Name ¶ added in v0.0.5
func (s *CpuacctGroup) Name() string
func (*CpuacctGroup) Remove ¶
func (s *CpuacctGroup) Remove(d *cgroupData) error
type CpusetGroup ¶
type CpusetGroup struct { }
func (*CpusetGroup) Apply ¶
func (s *CpusetGroup) Apply(d *cgroupData) error
func (*CpusetGroup) GetStats ¶
func (s *CpusetGroup) GetStats(path string, stats *cgroups.Stats) error
func (*CpusetGroup) Name ¶ added in v0.0.5
func (s *CpusetGroup) Name() string
func (*CpusetGroup) Remove ¶
func (s *CpusetGroup) Remove(d *cgroupData) error
type CpusetGroupV2 ¶
type CpusetGroupV2 struct { }
func (*CpusetGroupV2) Apply ¶
func (s *CpusetGroupV2) Apply(d *cgroupData) error
func (*CpusetGroupV2) GetStats ¶
func (s *CpusetGroupV2) GetStats(path string, stats *cgroups.Stats) error
func (*CpusetGroupV2) Name ¶
func (s *CpusetGroupV2) Name() string
func (*CpusetGroupV2) Remove ¶
func (s *CpusetGroupV2) Remove(d *cgroupData) error
type DevicesGroup ¶
type DevicesGroup struct { }
func (*DevicesGroup) Apply ¶
func (s *DevicesGroup) Apply(d *cgroupData) error
func (*DevicesGroup) GetStats ¶
func (s *DevicesGroup) GetStats(path string, stats *cgroups.Stats) error
func (*DevicesGroup) Name ¶ added in v0.0.5
func (s *DevicesGroup) Name() string
func (*DevicesGroup) Remove ¶
func (s *DevicesGroup) Remove(d *cgroupData) error
type FreezerGroup ¶
type FreezerGroup struct { }
func (*FreezerGroup) Apply ¶
func (s *FreezerGroup) Apply(d *cgroupData) error
func (*FreezerGroup) GetStats ¶
func (s *FreezerGroup) GetStats(path string, stats *cgroups.Stats) error
func (*FreezerGroup) Name ¶ added in v0.0.5
func (s *FreezerGroup) Name() string
func (*FreezerGroup) Remove ¶
func (s *FreezerGroup) Remove(d *cgroupData) error
type FreezerGroupV2 ¶
type FreezerGroupV2 struct { }
func (*FreezerGroupV2) Apply ¶
func (s *FreezerGroupV2) Apply(d *cgroupData) error
func (*FreezerGroupV2) GetStats ¶
func (s *FreezerGroupV2) GetStats(path string, stats *cgroups.Stats) error
func (*FreezerGroupV2) Name ¶
func (s *FreezerGroupV2) Name() string
func (*FreezerGroupV2) Remove ¶
func (s *FreezerGroupV2) Remove(d *cgroupData) error
type HugetlbGroup ¶
type HugetlbGroup struct { }
func (*HugetlbGroup) Apply ¶
func (s *HugetlbGroup) Apply(d *cgroupData) error
func (*HugetlbGroup) GetStats ¶
func (s *HugetlbGroup) GetStats(path string, stats *cgroups.Stats) error
func (*HugetlbGroup) Name ¶ added in v0.0.5
func (s *HugetlbGroup) Name() string
func (*HugetlbGroup) Remove ¶
func (s *HugetlbGroup) Remove(d *cgroupData) error
type Manager ¶
type Manager struct { Cgroups *configs.Cgroup Rootless bool // ignore permission-related errors Paths map[string]string // contains filtered or unexported fields }
func (*Manager) Freeze ¶
func (m *Manager) Freeze(state configs.FreezerState) error
Freeze toggles the container's freezer cgroup depending on the state provided
func (*Manager) GetAllPids ¶ added in v0.0.7
type MemoryGroup ¶
type MemoryGroup struct { }
func (*MemoryGroup) Apply ¶
func (s *MemoryGroup) Apply(d *cgroupData) (err error)
func (*MemoryGroup) GetStats ¶
func (s *MemoryGroup) GetStats(path string, stats *cgroups.Stats) error
func (*MemoryGroup) Name ¶ added in v0.0.5
func (s *MemoryGroup) Name() string
func (*MemoryGroup) Remove ¶
func (s *MemoryGroup) Remove(d *cgroupData) error
type MemoryGroupV2 ¶
type MemoryGroupV2 struct { }
func (*MemoryGroupV2) Apply ¶
func (s *MemoryGroupV2) Apply(d *cgroupData) (err error)
func (*MemoryGroupV2) GetStats ¶
func (s *MemoryGroupV2) GetStats(path string, stats *cgroups.Stats) error
func (*MemoryGroupV2) Name ¶
func (s *MemoryGroupV2) Name() string
func (*MemoryGroupV2) Remove ¶
func (s *MemoryGroupV2) Remove(d *cgroupData) error
type NetClsGroup ¶
type NetClsGroup struct { }
func (*NetClsGroup) Apply ¶
func (s *NetClsGroup) Apply(d *cgroupData) error
func (*NetClsGroup) GetStats ¶
func (s *NetClsGroup) GetStats(path string, stats *cgroups.Stats) error
func (*NetClsGroup) Name ¶ added in v0.0.5
func (s *NetClsGroup) Name() string
func (*NetClsGroup) Remove ¶
func (s *NetClsGroup) Remove(d *cgroupData) error
type NetPrioGroup ¶
type NetPrioGroup struct { }
func (*NetPrioGroup) Apply ¶
func (s *NetPrioGroup) Apply(d *cgroupData) error
func (*NetPrioGroup) GetStats ¶
func (s *NetPrioGroup) GetStats(path string, stats *cgroups.Stats) error
func (*NetPrioGroup) Name ¶ added in v0.0.5
func (s *NetPrioGroup) Name() string
func (*NetPrioGroup) Remove ¶
func (s *NetPrioGroup) Remove(d *cgroupData) error
type PerfEventGroup ¶
type PerfEventGroup struct { }
func (*PerfEventGroup) Apply ¶
func (s *PerfEventGroup) Apply(d *cgroupData) error
func (*PerfEventGroup) GetStats ¶
func (s *PerfEventGroup) GetStats(path string, stats *cgroups.Stats) error
func (*PerfEventGroup) Name ¶ added in v0.0.5
func (s *PerfEventGroup) Name() string
func (*PerfEventGroup) Remove ¶
func (s *PerfEventGroup) Remove(d *cgroupData) error
type PidsGroup ¶ added in v0.0.7
type PidsGroup struct { }
type PidsGroupV2 ¶
type PidsGroupV2 struct { }
func (*PidsGroupV2) Apply ¶
func (s *PidsGroupV2) Apply(d *cgroupData) error
func (*PidsGroupV2) GetStats ¶
func (s *PidsGroupV2) GetStats(path string, stats *cgroups.Stats) error
func (*PidsGroupV2) Name ¶
func (s *PidsGroupV2) Name() string
func (*PidsGroupV2) Remove ¶
func (s *PidsGroupV2) Remove(d *cgroupData) error
Click to show internal directories.
Click to hide internal directories.