Documentation ¶
Index ¶
- Constants
- func DeviceToCgroupDevice(device string) (*configs.Device, error)
- func DeviceToLinuxDevice(device string) (specs.LinuxDeviceCgroup, error)
- func EnableSystemdCgroup()
- func IsSystemdCgroup(cgroupPath string) bool
- func RenameCgroupPath(path string) (string, error)
- func UseSystemdCgroup() bool
- func ValidCgroupPath(path string, systemdCgroup bool) (string, error)
- type Config
- type Manager
- func (m *Manager) Add(pid int) error
- func (m *Manager) AddDevice(device string) error
- func (m *Manager) Apply() error
- func (m *Manager) Destroy() error
- func (m *Manager) GetCgroups() (*configs.Cgroup, error)
- func (m *Manager) GetPaths() map[string]string
- func (m *Manager) RemoveDevice(device string) error
Constants ¶
View Source
const CgroupKataPrefix = "kata"
prepend a kata specific string to oci cgroup path to form a different cgroup path, thus cAdvisor couldn't find kata containers cgroup path on host to prevent it from grabbing the stats data.
View Source
const DefaultCgroupPath = "/vc"
DefaultCgroupPath runtime-determined location in the cgroups hierarchy.
Variables ¶
This section is empty.
Functions ¶
func DeviceToLinuxDevice ¶
func EnableSystemdCgroup ¶
func EnableSystemdCgroup()
func IsSystemdCgroup ¶
func RenameCgroupPath ¶
func UseSystemdCgroup ¶
func UseSystemdCgroup() bool
func ValidCgroupPath ¶
validCgroupPath returns a valid cgroup path. see https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#cgroups-path
Types ¶
type Config ¶
type Config struct { // Cgroups specifies specific cgroup settings for the various subsystems that the container is // placed into to limit the resources the container has available // If nil, New() will create one. Cgroups *configs.Cgroup // CgroupPaths contains paths to all the cgroups setup for a container. Key is cgroup subsystem name // with the value as the path. CgroupPaths map[string]string // Resources represents the runtime resource constraints Resources specs.LinuxResources // CgroupPath is the OCI spec cgroup path CgroupPath string }
Click to show internal directories.
Click to hide internal directories.