systemd

package
v1.0.0-rc90 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 17 Imported by: 458

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandSlice added in v1.0.0

func ExpandSlice(slice string) (string, error)

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 NewSystemdCgroupsManager

func NewSystemdCgroupsManager() (func(config *configs.Cgroup, paths map[string]string) cgroups.Manager, error)

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)

func (*LegacyManager) Set added in v1.2.0

func (m *LegacyManager) Set(container *configs.Config) 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)

func (*UnifiedManager) Set added in v1.2.0

func (m *UnifiedManager) Set(container *configs.Config) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL