mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Change package name to cgroups-rs
We need a new package name to create a new crate Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
@@ -11,11 +11,11 @@ is planned for the Unified hierarchy.
|
||||
``` rust
|
||||
|
||||
|
||||
use cgroups::*;
|
||||
use cgroups::cgroup_builder::*;
|
||||
use cgroups_rs::*;
|
||||
use cgroups_rs::cgroup_builder::*;
|
||||
|
||||
// Acquire a handle for the cgroup hierarchy.
|
||||
let hier = cgroups::hierarchies::auto();
|
||||
let hier = cgroups_rs::hierarchies::auto();
|
||||
|
||||
// Use the builder pattern (see the documentation to create the control group)
|
||||
//
|
||||
@@ -30,7 +30,7 @@ let hier = cgroups::hierarchies::auto();
|
||||
// other control groups.
|
||||
|
||||
// Get a handle to the CPU controller.
|
||||
let cpus: &cgroups::cpu::CpuController = cg.controller_of().unwrap();
|
||||
let cpus: &cgroups_rs::cpu::CpuController = cg.controller_of().unwrap();
|
||||
cpus.add_task(&CgroupPid::from(1234u64));
|
||||
|
||||
// [...]
|
||||
|
||||
Reference in New Issue
Block a user