Documentation ¶
Index ¶
Constants ¶
View Source
const (
CgroupMountDir = "/tmp/rjob/cgroup"
)
Set a few constants for simplicity. These could be read from a configuration.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CgroupConfig ¶
CgroupConfig is used to create, delete, and manage a cgroup.
func (*CgroupConfig) Create ¶
func (cg *CgroupConfig) Create() error
Create will create the configured cgroup and set the limits for cpu, memory, and io.
func (*CgroupConfig) Delete ¶
func (cg *CgroupConfig) Delete() error
Delete will delete the configured cgroup by removing the directory. Processes int the cgroup must be killed or moved before deleting.
Click to show internal directories.
Click to hide internal directories.