Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller represents a named controller for a process
func (*Controller) Set ¶
func (c *Controller) Set(name string, value interface{}) error
Set sets the value of a controller setting
type Manager ¶ added in v1.5.0
type Manager interface { // GetProcessControllers returns the mapping between controller types and // their paths inside cgroup fs for the specified PID. GetProcessControllers() (map[string]string, error) // GetProcessController returns a named resource Controller for the specified PID. GetProcessController(controllerName string) (*Controller, error) // MoveProcess move the process to the path under a cgroup controller MoveProcess(controller, path string) error }
Manager provides an interface to operate on linux cgroups
func NewManager ¶ added in v1.5.0
func NewManager(pid interface{}, fsys fs.FileSystem) Manager
NewManager returns an instance of RealManager
type RealManager ¶ added in v1.5.0
type RealManager struct {
// contains filtered or unexported fields
}
RealManager provides an implementation of Manager which is using default linux system paths to access info about cgroups for processes.
func (*RealManager) GetProcessController ¶ added in v1.5.0
func (c *RealManager) GetProcessController(controllerName string) (*Controller, error)
GetProcessController is an implementation of GetProcessController method of Manager interface.
func (*RealManager) GetProcessControllers ¶ added in v1.5.0
func (c *RealManager) GetProcessControllers() (map[string]string, error)
GetProcessControllers is an implementation of GetProcessControllers method of Manager interface.
func (*RealManager) MoveProcess ¶ added in v1.5.0
func (c *RealManager) MoveProcess(controller, path string) error
MoveProcess implements MoveProcess method of Manager
Click to show internal directories.
Click to hide internal directories.