Documentation
¶
Overview ¶
Package cgroups provides cgroup management for containers.
Index ¶
- type Config
- type Manager
- func (m *Manager) AddProcess(containerID string, pid int) error
- func (m *Manager) Create(containerID string, cfg *Config) (string, error)
- func (m *Manager) Destroy(containerID string) error
- func (m *Manager) Freeze(containerID string) error
- func (m *Manager) GetStats(containerID string) (map[string]interface{}, error)
- func (m *Manager) IsAvailable() bool
- func (m *Manager) KillAll(containerID string) error
- func (m *Manager) Thaw(containerID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
CPUPeriod uint64
CPUQuota int64
CpusetCpus string
CpusetMems string
Memory int64
MemorySwap int64
MemorySwappiness *uint64
PidsLimit int64
BlkioWeight uint16
NanoCpus int64
OomKillDisable bool
}
Config holds cgroup configuration.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages cgroups v2 for containers.
func (*Manager) AddProcess ¶
AddProcess adds a process to the cgroup.
func (*Manager) IsAvailable ¶
IsAvailable checks if cgroups v2 is available.
Click to show internal directories.
Click to hide internal directories.