Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SubSystemsIns = []SubSystem{ &MemorySubSystem{}, } )
Initialize a instance using subsystems.
Functions ¶
func FindCgroupMountpoint ¶
FindCgroupMountpoint returns the mountpoint for given subsystem.
Types ¶
type MemorySubSystem ¶
type MemorySubSystem struct{}
MemorySubSystem is the implement of memory subsystem.
func (*MemorySubSystem) Apply ¶
func (s *MemorySubSystem) Apply(cgroupPath string, pid int) error
Apply add a process represented by pid to given cgroup's subsystem.
func (*MemorySubSystem) Remove ¶
func (s *MemorySubSystem) Remove(cgroupPath string) error
Remove removes the given cgroup.
func (*MemorySubSystem) Set ¶
func (s *MemorySubSystem) Set(cgroupPath string, res *ResourceConfig) error
Set sets the limit of given cgroup.
type ResourceConfig ¶
ResourceConfig is configs of resources.
Click to show internal directories.
Click to hide internal directories.