runc module #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Low-level container runtime implementation using runc, providing OCI-compliant container execution with direct control over container lifecycle and cgroup management.
Functionality
Module API
Runc Client
RuncClient::new() -> Result<Self, RuncError>- Create clientRuncClient::with_runc_path(path: &str) -> Self- Set runc binaryRuncClient::with_systemd_cgroup() -> Self- Use systemd cgroup?RuncClient::with_root(path: &str) -> Self- Set root directoryRuncClient::version() -> Result<VersionInfo, RuncError>- Get versionRuncClient::check_spec(&self, spec: &OCISpec) -> Result<(), RuncError>- Validate specContainer Operations
create_container(&self, id: &str, bundle: &Path) -> Result<(), RuncError>- Create containerstart_container(&self, id: &str) -> Result<(), RuncError>- Start containerdelete_container(&self, id: &str, force: bool) -> Result<(), RuncError>- Delete containerkill_container(&self, id: &str, signal: Signal) -> Result<(), RuncError>- Send signallist_containers(&self) -> Result<Vec<ContainerState>, RuncError>- List containersstate_container(&self, id: &str) -> Result<ContainerState, RuncError>- Get stateProcess Operations
exec_process(&self, id: &str, process: &ProcessSpec) -> Result<ExecResult, RuncError>- Exec processps_container(&self, id: &str) -> Result<Vec<ProcessInfo>, RuncError>- List processesupdate_container(&self, id: &str, resources: &LinuxResources) -> Result<(), RuncError>- Update resourcesCheckpoint/Restore
checkpoint_container(&self, id: &str, options: &CheckpointOptions) -> Result<(), RuncError>- Checkpointrestore_container(&self, id: &str, bundle: &Path, options: &RestoreOptions) -> Result<(), RuncError>- Restorelist_checkpoints(&self, id: &str) -> Result<Vec<CheckpointInfo>, RuncError>- List checkpointsEvent Handling
events(&self) -> Result<EventStream, RuncError>- Stream eventssubscribe_events(&self, filters: EventFilters) -> Result<EventStream, RuncError>- Subscribe to eventsCgroup Management
create_cgroup(&self, path: &str, config: CgroupConfig) -> Result<(), RuncError>- Create cgroupdelete_cgroup(&self, path: &str) -> Result<(), RuncError>- Delete cgroupget_cgroup_stats(&self, path: &str) -> Result<CgroupStats, RuncError>- Get statsupdate_cgroup(&self, path: &str, config: CgroupConfig) -> Result<(), RuncError>- Update cgroup