pub(crate) struct GenerateRuntimeArgs<'a> {
pub(crate) config: &'a Config,
pub(crate) id: &'a str,
pub(crate) container_io: &'a ContainerIO,
pub(crate) pidfile: &'a Path,
pub(crate) cgroup_manager: CgroupManager,
}Expand description
What the command line of the OCI runtime gets generated from.
Fields§
§config: &'a Config§id: &'a str§container_io: &'a ContainerIO§pidfile: &'a Path§cgroup_manager: CgroupManagerImplementations§
Source§impl GenerateRuntimeArgs<'_>
impl GenerateRuntimeArgs<'_>
const SYSTEMD_CGROUP_ARG: &'static str = "--systemd-cgroup"
const LOG_LEVEL_FLAG_CRUN: &'static str = "--log-level"
Sourcepub(crate) fn create_args(
&self,
bundle_path: &Path,
restore_path: Option<&Path>,
command_args: impl IntoIterator<Item = impl AsRef<str>>,
) -> Result<Vec<String>>
pub(crate) fn create_args( &self, bundle_path: &Path, restore_path: Option<&Path>, command_args: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<Vec<String>>
Generate the OCI runtime CLI arguments of a create, or of a restore
from the checkpoint at restore_path, like conmon with --restore:
the restore command takes the place of create, with --detach,
as the container runs once it got restored, the checkpoint as
--image-path and the bundle as --work-path, where CRIU runs and
writes its logs. The bundle and the PID file stay the same, and so do
the command_args, which carry the options of the restore, like the
--runtime-opt of conmon.
Sourcepub(crate) fn exec_args(
&self,
command: impl IntoIterator<Item = impl AsRef<str>>,
) -> Result<ExecArgs>
pub(crate) fn exec_args( &self, command: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<ExecArgs>
Generate the OCI runtime CLI arguments of an exec, of an exec_sync or
a streaming one alike. They are not logged here, the command may carry
secrets, see LoggedArgs.
Sourcefn checked_id(&self) -> Result<&str>
fn checked_id(&self) -> Result<&str>
The container ID, which the runtimes take as a positional argument,
see check_id.
Sourcefn default_args(&self) -> Vec<String>
fn default_args(&self) -> Vec<String>
Build the default arguments for any provided runtime.
Trait Implementations§
Source§impl<'a> Clone for GenerateRuntimeArgs<'a>
impl<'a> Clone for GenerateRuntimeArgs<'a>
impl<'a> Copy for GenerateRuntimeArgs<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for GenerateRuntimeArgs<'a>
impl<'a> !UnwindSafe for GenerateRuntimeArgs<'a>
impl<'a> Freeze for GenerateRuntimeArgs<'a>
impl<'a> Send for GenerateRuntimeArgs<'a>
impl<'a> Sync for GenerateRuntimeArgs<'a>
impl<'a> Unpin for GenerateRuntimeArgs<'a>
impl<'a> UnsafeUnpin for GenerateRuntimeArgs<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].