-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for cgroups managed by systemd
- Loading branch information
Showing
7 changed files
with
151 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use anyhow::Result; | ||
use nix::unistd::Pid; | ||
use oci_spec::LinuxResources; | ||
use std::path::PathBuf; | ||
|
||
use crate::cgroups::common::CgroupManager; | ||
|
||
pub struct SystemDCGroupManager {} | ||
|
||
impl SystemDCGroupManager { | ||
pub fn new(cgroup_path: PathBuf) -> Result<Self> { | ||
Ok(SystemDCGroupManager {}) | ||
} | ||
} | ||
|
||
impl CgroupManager for SystemDCGroupManager { | ||
fn apply(&self, linux_resources: &LinuxResources, pid: Pid) -> Result<()> { | ||
Ok(()) | ||
} | ||
|
||
fn remove(&self) -> Result<()> { | ||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters