Documentation ¶
Index ¶
- type CGroups
- func (cg *CGroups) GetPids() ([]int, error)
- func (cg *CGroups) Load() error
- func (cg *CGroups) Remove() error
- func (cg *CGroups) SetCPULimit(quota float64) *CGroups
- func (cg *CGroups) SetMemorySwapLimit(memory, swap int) *CGroups
- func (cg *CGroups) SetPath(path string) *CGroups
- func (cg *CGroups) SetProcessLimit(number int) *CGroups
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CGroups ¶
type CGroups struct { Path string // contains filtered or unexported fields }
func (*CGroups) Remove ¶
Remove removes CGroups.
It will only works if there is no process running in the CGroups
func (*CGroups) SetCPULimit ¶
SetCPULimit sets number of CPU for the CGroups.
func (*CGroups) SetMemorySwapLimit ¶
SetMemorySwapLimit sets memory and swap limit for CGroups.
Zero or lower values consider as MAX.
func (*CGroups) SetPath ¶
SetPath sets Path for CGroups.
NOTE: it does not require CGroup base path (/sys/fs/cgroup)
func (*CGroups) SetProcessLimit ¶
SetProcessLimit sets maximum processes than can be created simultaneously in CGroups.
Click to show internal directories.
Click to hide internal directories.