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) GetCgroups() (*configs.Cgroup, error)
- func (m *LegacyManager) GetPaths() map[string]string
- func (m *LegacyManager) GetPids() ([]int, error)
- func (m *LegacyManager) GetStats() (*cgroups.Stats, error)
- func (m *LegacyManager) GetUnifiedPath() (string, 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) GetCgroups() (*configs.Cgroup, error)
- func (m *UnifiedManager) GetPaths() map[string]string
- func (m *UnifiedManager) GetPids() ([]int, error)
- func (m *UnifiedManager) GetStats() (*cgroups.Stats, error)
- func (m *UnifiedManager) GetUnifiedPath() (string, error)
- func (m *UnifiedManager) Set(container *configs.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandSlice ¶ added in v1.0.0
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 ¶ added in v1.2.0
type LegacyManager struct { Cgroups *configs.Cgroup Paths map[string]string // contains filtered or unexported fields }
func (*LegacyManager) Apply ¶ added in v1.2.0
func (m *LegacyManager) Apply(pid int) error
func (*LegacyManager) Destroy ¶ added in v1.2.0
func (m *LegacyManager) Destroy() error
func (*LegacyManager) Freeze ¶ added in v1.2.0
func (m *LegacyManager) Freeze(state configs.FreezerState) error
func (*LegacyManager) GetAllPids ¶ added in v1.2.0
func (m *LegacyManager) GetAllPids() ([]int, error)
func (*LegacyManager) GetCgroups ¶ added in v1.2.0
func (m *LegacyManager) GetCgroups() (*configs.Cgroup, error)
func (*LegacyManager) GetPaths ¶ added in v1.2.0
func (m *LegacyManager) GetPaths() map[string]string
func (*LegacyManager) GetPids ¶ added in v1.2.0
func (m *LegacyManager) GetPids() ([]int, error)
func (*LegacyManager) GetStats ¶ added in v1.2.0
func (m *LegacyManager) GetStats() (*cgroups.Stats, error)
func (*LegacyManager) GetUnifiedPath ¶
func (m *LegacyManager) GetUnifiedPath() (string, error)
type UnifiedManager ¶ added in v1.2.0
type UnifiedManager struct { Cgroups *configs.Cgroup Paths map[string]string // contains filtered or unexported fields }
func (*UnifiedManager) Apply ¶ added in v1.2.0
func (m *UnifiedManager) Apply(pid int) error
func (*UnifiedManager) Destroy ¶ added in v1.2.0
func (m *UnifiedManager) Destroy() error
func (*UnifiedManager) Freeze ¶ added in v1.2.0
func (m *UnifiedManager) Freeze(state configs.FreezerState) error
func (*UnifiedManager) GetAllPids ¶ added in v1.2.0
func (m *UnifiedManager) GetAllPids() ([]int, error)
func (*UnifiedManager) GetCgroups ¶ added in v1.2.0
func (m *UnifiedManager) GetCgroups() (*configs.Cgroup, error)
func (*UnifiedManager) GetPaths ¶ added in v1.2.0
func (m *UnifiedManager) GetPaths() map[string]string
func (*UnifiedManager) GetPids ¶ added in v1.2.0
func (m *UnifiedManager) GetPids() ([]int, error)
func (*UnifiedManager) GetStats ¶ added in v1.2.0
func (m *UnifiedManager) GetStats() (*cgroups.Stats, error)
func (*UnifiedManager) GetUnifiedPath ¶
func (m *UnifiedManager) GetUnifiedPath() (string, error)
Click to show internal directories.
Click to hide internal directories.