Documentation ¶
Index ¶
- Constants
- func CheckMemoryUsage(dirPath string, r *configs.Resources) error
- func CreateCgroupPath(path string, c *configs.Cgroup) (Err error)
- func OOMKillCount(path string) (uint64, error)
- type Manager
- func (m *Manager) Apply(pid int) error
- func (m *Manager) Destroy() error
- func (m *Manager) Exists() bool
- func (m *Manager) Freeze(state configs.FreezerState) error
- func (m *Manager) GetAllPids() ([]int, error)
- func (m *Manager) GetCgroups() (*configs.Cgroup, error)
- func (m *Manager) GetFreezerState() (configs.FreezerState, error)
- func (m *Manager) GetPaths() map[string]string
- func (m *Manager) GetPids() ([]int, error)
- func (m *Manager) GetStats() (*cgroups.Stats, error)
- func (m *Manager) OOMKillCount() (uint64, error)
- func (m *Manager) Path(_ string) string
- func (m *Manager) Set(r *configs.Resources) error
Constants ¶
View Source
const UnifiedMountpoint = "/sys/fs/cgroup"
Variables ¶
This section is empty.
Functions ¶
func CheckMemoryUsage ¶ added in v1.2.0
func CreateCgroupPath ¶
CreateCgroupPath creates cgroupv2 path, enabling all the supported controllers.
func OOMKillCount ¶
Types ¶
type Manager ¶ added in v1.2.0
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
NewManager creates a manager for cgroup v2 unified hierarchy. dirPath is like "/sys/fs/cgroup/user.slice/user-1001.slice/session-1.scope". If dirPath is empty, it is automatically set using config.
func (*Manager) GetAllPids ¶ added in v1.2.0
func (*Manager) GetCgroups ¶ added in v1.2.0
func (*Manager) GetFreezerState ¶ added in v1.2.0
func (m *Manager) GetFreezerState() (configs.FreezerState, error)
func (*Manager) OOMKillCount ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.