Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CgroupName ¶
type CgroupName []string
CgroupName is the abstract name of a cgroup prior to any driver specific conversion. It is specified as a list of strings from its individual components, such as: {"kubepods", "burstable", "pod1234-abcd-5678-efgh"}
func NewCgroupName ¶
func NewCgroupName(base CgroupName, components ...string) CgroupName
NewCgroupName composes a new cgroup name. Use RootCgroupName as base to start at the root. This function does some basic check for invalid characters at the name.
func (CgroupName) ToCgroupfs ¶
func (cgroupName CgroupName) ToCgroupfs() string
func (CgroupName) ToSystemd ¶
func (cgroupName CgroupName) ToSystemd() string
cgroupName.ToSystemd converts the internal cgroup name to a systemd name. For example, the name {"kubepods", "burstable", "pod1234-abcd-5678-efgh"} becomes "/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod1234_abcd_5678_efgh.slice" This function always expands the systemd name into the cgroupfs form. If only the last part is needed, use path.Base(...) on it to discard the rest.