systemd

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandSlice

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

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)

func (*LegacyManager) GetStats

func (m *LegacyManager) GetStats() (*cgroups.Stats, error)

func (*LegacyManager) Set

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

func (*UnifiedManager) GetStats

func (m *UnifiedManager) GetStats() (*cgroups.Stats, error)

func (*UnifiedManager) Set

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