[][src]Trait cgroups_rs::Controller

pub trait Controller {
    pub fn path(&self) -> &Path;
pub fn apply(&self, res: &Resources) -> Result<()>;
pub fn create(&self);
pub fn exists(&self) -> bool;
pub fn set_notify_on_release(&self, enable: bool) -> Result<()>;
pub fn set_release_agent(&self, path: &str) -> Result<()>;
pub fn delete(&self) -> Result<()>;
pub fn add_task(&self, pid: &CgroupPid) -> Result<()>;
pub fn add_task_by_tgid(&self, pid: &CgroupPid) -> Result<()>;
pub fn tasks(&self) -> Vec<CgroupPid>;
pub fn v2(&self) -> bool; }

A Controller is a subsystem attached to the control group.

Implementors are able to control certain aspects of a control group.

Required methods

pub fn path(&self) -> &Path[src]

The file system path to the controller.

pub fn apply(&self, res: &Resources) -> Result<()>[src]

Apply a set of resources to the Controller, invoking its internal functions to pass the kernel the information.

pub fn create(&self)[src]

Create this controller

pub fn exists(&self) -> bool[src]

Does this controller already exist?

pub fn set_notify_on_release(&self, enable: bool) -> Result<()>[src]

Set notify_on_release

pub fn set_release_agent(&self, path: &str) -> Result<()>[src]

Set release_agent

pub fn delete(&self) -> Result<()>[src]

Delete the controller.

pub fn add_task(&self, pid: &CgroupPid) -> Result<()>[src]

Attach a task to this controller.

pub fn add_task_by_tgid(&self, pid: &CgroupPid) -> Result<()>[src]

Attach a task to this controller.

pub fn tasks(&self) -> Vec<CgroupPid>[src]

Get the list of tasks that this controller has.

pub fn v2(&self) -> bool[src]

Loading content...

Implementors

impl<T> Controller for T where
    T: ControllerInternal, 
[src]

pub fn apply(&self, res: &Resources) -> Result<()>[src]

Apply a set of resources to the Controller, invoking its internal functions to pass the kernel the information.

pub fn create(&self)[src]

Create this controller

pub fn set_notify_on_release(&self, enable: bool) -> Result<()>[src]

Set notify_on_release

pub fn set_release_agent(&self, path: &str) -> Result<()>[src]

Set release_agent

pub fn exists(&self) -> bool[src]

Does this controller already exist?

pub fn delete(&self) -> Result<()>[src]

Delete the controller.

pub fn add_task(&self, pid: &CgroupPid) -> Result<()>[src]

Attach a task to this controller.

pub fn add_task_by_tgid(&self, pid: &CgroupPid) -> Result<()>[src]

Attach a task to this controller by thread group id.

pub fn tasks(&self) -> Vec<CgroupPid>[src]

Get the list of tasks that this controller has.

Loading content...