Documentation ¶
Index ¶
- func ExpandSlice(slice string) (string, error)
- func NewSystemdCgroupsManager() (func(config *configs.Cgroup, paths map[string]string) cgroups.Manager, error)
- func UseSystemd() bool
- type LegacyManager
- func (m *LegacyManager) Apply(pid int) error
- func (m *LegacyManager) Destroy() error
- func (m *LegacyManager) Freeze(state configs.FreezerState) error
- func (m *LegacyManager) GetAllPids() ([]int, error)
- func (m *LegacyManager) GetPaths() map[string]string
- func (m *LegacyManager) GetPids() ([]int, error)
- func (m *LegacyManager) GetStats() (*cgroups.Stats, error)
- func (m *LegacyManager) Set(container *configs.Config) error
- type UnifiedManager
- func (m *UnifiedManager) Apply(pid int) error
- func (m *UnifiedManager) Destroy() error
- func (m *UnifiedManager) Freeze(state configs.FreezerState) error
- func (m *UnifiedManager) GetAllPids() ([]int, error)
- func (m *UnifiedManager) GetPaths() map[string]string
- func (m *UnifiedManager) GetPids() ([]int, error)
- func (m *UnifiedManager) GetStats() (*cgroups.Stats, error)
- func (m *UnifiedManager) Set(container *configs.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandSlice ¶
systemd represents slice hierarchy using `-`, so we need to follow suit when generating the path of slice. Essentially, test-a-b.slice becomes /test.slice/test-a.slice/test-a-b.slice.
func UseSystemd ¶
func UseSystemd() bool
Types ¶
type LegacyManager ¶
type LegacyManager struct { Cgroups *configs.Cgroup Paths map[string]string // contains filtered or unexported fields }
func (*LegacyManager) Apply ¶
func (m *LegacyManager) Apply(pid int) error
func (*LegacyManager) Destroy ¶
func (m *LegacyManager) Destroy() error
func (*LegacyManager) Freeze ¶
func (m *LegacyManager) Freeze(state configs.FreezerState) error
func (*LegacyManager) GetAllPids ¶
func (m *LegacyManager) GetAllPids() ([]int, error)
func (*LegacyManager) GetPaths ¶
func (m *LegacyManager) GetPaths() map[string]string
func (*LegacyManager) GetPids ¶
func (m *LegacyManager) GetPids() ([]int, error)
type UnifiedManager ¶
type UnifiedManager struct { Cgroups *configs.Cgroup Paths map[string]string // contains filtered or unexported fields }
func (*UnifiedManager) Apply ¶
func (m *UnifiedManager) Apply(pid int) error
func (*UnifiedManager) Destroy ¶
func (m *UnifiedManager) Destroy() error
func (*UnifiedManager) Freeze ¶
func (m *UnifiedManager) Freeze(state configs.FreezerState) error
func (*UnifiedManager) GetAllPids ¶
func (m *UnifiedManager) GetAllPids() ([]int, error)
func (*UnifiedManager) GetPaths ¶
func (m *UnifiedManager) GetPaths() map[string]string
func (*UnifiedManager) GetPids ¶
func (m *UnifiedManager) GetPids() ([]int, error)
Click to show internal directories.
Click to hide internal directories.