Documentation ¶
Index ¶
- func CreateCgroups(root string, subcgroup string, serviceNames []string) error
- func GetOwnCgroupPath(controller string) (string, error)
- func IsIsolatorSupported(isolator string) bool
- func MaybeAddIsolator(opts []*unit.UnitOption, isolator string, limit *resource.Quantity) ([]*unit.UnitOption, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCgroups ¶
CreateCgroups mounts the cgroup controllers hierarchy for the container but leaves the subcgroup for each app read-write so the systemd inside stage1 can apply isolators to them
func GetOwnCgroupPath ¶
GetOwnCgroupPath returns the cgroup path of this process in controller hierarchy
func IsIsolatorSupported ¶
IsIsolatorSupported returns whether an isolator is supported in the kernel
func MaybeAddIsolator ¶
func MaybeAddIsolator(opts []*unit.UnitOption, isolator string, limit *resource.Quantity) ([]*unit.UnitOption, error)
MaybeAddIsolator considers the given isolator; if the type is known (i.e. IsIsolatorSupported is true) and the limit is non-nil, the supplied opts will be extended with an appropriate option implementing the desired isolation.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.