# Packages
No description provided by the author
# Functions
AllowAny allows any subsystem errors to be skipped.
Default returns all the groups in the default cgroups mountpoint in a single hierarchy.
IgnoreModules configure the memory controller to not read memory metrics for some module names (e.g.
IgnoreNotExist ignores any errors that are for not existing files.
Load will load an existing cgroup and allow it to be controlled All static path should not include `/sys/fs/cgroup/` prefix, it should start with your own cgroups name.
MemoryPressureEvent returns a new [MemoryEvent] representing the memory pressure set.
MemoryThresholdEvent returns a new [MemoryEvent] representing the memory threshold set.
NestedPath will nest the cgroups based on the calling processes cgroup placing its child processes inside its own path.
New returns a new control via the cgroup cgroups interface.
NewBlkio returns a Blkio controller given the root folder of cgroups.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewMemory returns a Memory controller given the root folder of cgroups.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
OOMEvent returns a new oom event to be used with RegisterMemoryEvent.
OptionalSwap allows the memory controller to not fail if cgroups is not accounting Swap memory (there are no memory.memsw.* entries).
ParseCgroupFile parses the given cgroup file, typically /proc/self/cgroup or /proc/<pid>/cgroup, into a map of subsystems to cgroup paths, e.g.
ParseCgroupFileUnified returns legacy subsystem paths as the first value, and returns the unified path as the second value.
PidPath will return the correct cgroup paths for an existing process running inside a cgroup This is commonly used for the Load function to restore an existing container.
ProcRoot overrides the default location of the "/proc" filesystem.
RequireDevices requires the device subsystem but no others.
No description provided by the author
SingleSubsystem returns a single cgroup subsystem within the base Hierarchy.
No description provided by the author
StaticPath returns a static path to use for all cgroups.
Subsystems returns a complete list of the default cgroups available on most linux systems.
No description provided by the author
WithHiearchy sets a list of cgroup subsystems.
WithHierarchy sets a list of cgroup subsystems.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The three memory pressure levels are as follows.
There are three optional modes that specify different propagation behavior: - "default": this is the default behavior specified above.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
There are three optional modes that specify different propagation behavior: - "default": this is the default behavior specified above.
No description provided by the author
There are three optional modes that specify different propagation behavior: - "default": this is the default behavior specified above.
The three memory pressure levels are as follows.
The three memory pressure levels are as follows.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
ErrControllerNotActive is returned when a controller is not supported or enabled.
ErrDevicesRequired is returned when the devices subsystem is required but does not exist or is not active.
No description provided by the author
ErrIgnoreSubsystem allows the specific subsystem to be skipped.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
InitConfig provides configuration options for the creation or loading of a cgroup and its subsystems.
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
Cgroup handles interactions with the individual groups to perform actions on them as them main interface to this cgroup package.
MemoryEvent is an interface that V1 memory Cgroup notifications implement.
No description provided by the author
# Type aliases
ErrorHandler is a function that handles and acts on errors.
EventNotificationMode corresponds to the notification modes for the memory cgroups pressure level notifications.
Hierarchy enables both unified and split hierarchy for cgroups.
InitCheck allows subsystems errors to be checked when initialized or loaded.
InitOpts allows configuration for the creation or loading of a cgroup.
MemoryPressureLevel corresponds to the memory pressure levels defined for memory cgroups.
Name is a typed name for a cgroup subsystem.
No description provided by the author
State is a type that represents the state of the current cgroup.
No description provided by the author