pub struct MockRuntime {
pub logs_to_yield: Arc<Mutex<HashMap<ContainerId, VecDeque<Result<LogChunk>>>>>,
pub stats_to_yield: Arc<Mutex<HashMap<ContainerId, VecDeque<Result<StatsSample>>>>>,
pub pull_progress_to_yield: Arc<Mutex<HashMap<String, VecDeque<Result<PullProgress>>>>>,
/* private fields */
}Expand description
In-memory mock runtime for testing and development.
In addition to tracking container lifecycle in memory, the mock exposes
per-container queues for streaming method outputs so unit tests can
pre-script the events that Runtime::logs_stream,
Runtime::stats_stream, and Runtime::pull_image_stream should
yield. See MockRuntime::enqueue_log_chunk,
MockRuntime::enqueue_stats_sample, and
MockRuntime::enqueue_pull_progress.
Fields§
§logs_to_yield: Arc<Mutex<HashMap<ContainerId, VecDeque<Result<LogChunk>>>>>Pre-scripted log chunks per container. Each call to
Runtime::logs_stream drains this queue in order; once empty, the
stream either terminates (when follow=false) or hangs forever
(when follow=true) so tests can exercise both branches.
stats_to_yield: Arc<Mutex<HashMap<ContainerId, VecDeque<Result<StatsSample>>>>>Pre-scripted stats samples per container. Drained in order by
Runtime::stats_stream.
pull_progress_to_yield: Arc<Mutex<HashMap<String, VecDeque<Result<PullProgress>>>>>Pre-scripted pull progress events keyed by image reference. Drained
in order by Runtime::pull_image_stream.
Implementations§
Source§impl MockRuntime
impl MockRuntime
pub fn new() -> Self
Sourcepub async fn enqueue_log_chunk(&self, id: &ContainerId, chunk: LogChunk)
pub async fn enqueue_log_chunk(&self, id: &ContainerId, chunk: LogChunk)
Push a single LogChunk onto the queue for id. Subsequent calls to
Runtime::logs_stream will yield enqueued chunks in FIFO order.
Sourcepub async fn enqueue_log_error(&self, id: &ContainerId, err: AgentError)
pub async fn enqueue_log_error(&self, id: &ContainerId, err: AgentError)
Push a pre-built error onto the log queue for id. The next
Runtime::logs_stream call drains this as the next yielded item.
Sourcepub async fn enqueue_stats_sample(&self, id: &ContainerId, sample: StatsSample)
pub async fn enqueue_stats_sample(&self, id: &ContainerId, sample: StatsSample)
Push a single StatsSample onto the queue for id. Subsequent calls
to Runtime::stats_stream will yield enqueued samples in FIFO order.
Sourcepub async fn enqueue_pull_progress(&self, image: &str, progress: PullProgress)
pub async fn enqueue_pull_progress(&self, image: &str, progress: PullProgress)
Push a single PullProgress event onto the queue for image.
Subsequent calls to Runtime::pull_image_stream for the same image
reference will yield enqueued events in FIFO order.
Trait Implementations§
Source§impl Default for MockRuntime
impl Default for MockRuntime
Source§impl Runtime for MockRuntime
impl Runtime for MockRuntime
Source§fn pull_image<'life0, 'life1, 'async_trait>(
&'life0 self,
_image: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pull_image<'life0, 'life1, 'async_trait>(
&'life0 self,
_image: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn pull_image_with_policy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_image: &'life1 str,
_policy: PullPolicy,
_auth: Option<&'life2 RegistryAuth>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pull_image_with_policy<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_image: &'life1 str,
_policy: PullPolicy,
_auth: Option<&'life2 RegistryAuth>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn create_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
_spec: &'life2 ServiceSpec,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn create_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
_spec: &'life2 ServiceSpec,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn start_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn stop_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
_timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stop_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
_timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn remove_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn container_state<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<ContainerState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn container_state<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<ContainerState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn container_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
tail: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<LogEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn container_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
tail: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<LogEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn exec<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
cmd: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<(i32, String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn exec<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
cmd: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<(i32, String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn get_container_stats<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<ContainerStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_container_stats<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<ContainerStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn wait_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_container<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Vec<LogEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Vec<LogEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_container_pid<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Option<u32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_container_pid<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Option<u32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_container_ip<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Option<IpAddr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_container_ip<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Option<IpAddr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn list_images<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ImageInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_images<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ImageInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn remove_image<'life0, 'life1, 'async_trait>(
&'life0 self,
_image: &'life1 str,
_force: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_image<'life0, 'life1, 'async_trait>(
&'life0 self,
_image: &'life1 str,
_force: bool,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn prune_images<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PruneResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prune_images<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PruneResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn kill_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
signal: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn kill_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
signal: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn tag_image<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_source: &'life1 str,
_target: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn tag_image<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_source: &'life1 str,
_target: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn logs_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
opts: LogsStreamOptions,
) -> Pin<Box<dyn Future<Output = Result<LogsStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn logs_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
opts: LogsStreamOptions,
) -> Pin<Box<dyn Future<Output = Result<LogsStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn stats_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<StatsStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stats_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<StatsStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn pull_image_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
image: &'life1 str,
_auth: Option<&'life2 RegistryAuth>,
) -> Pin<Box<dyn Future<Output = Result<PullProgressStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pull_image_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
image: &'life1 str,
_auth: Option<&'life2 RegistryAuth>,
) -> Pin<Box<dyn Future<Output = Result<PullProgressStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn exec_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
cmd: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<ExecEventStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn exec_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
cmd: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<ExecEventStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn exec_pty<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_opts: ExecOptions,
) -> Pin<Box<dyn Future<Output = Result<ExecHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn exec_pty<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_opts: ExecOptions,
) -> Pin<Box<dyn Future<Output = Result<ExecHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
ExecHandle the caller drives concurrently with the running process. Read moreSource§fn wait_outcome<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<WaitOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_outcome<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<WaitOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
WaitOutcome with richer
classification (exit code + reason + signal + finished_at timestamp). Read moreSource§fn wait_outcome_with_condition<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
_condition: WaitCondition,
) -> Pin<Box<dyn Future<Output = Result<WaitOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_outcome_with_condition<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 ContainerId,
_condition: WaitCondition,
) -> Pin<Box<dyn Future<Output = Result<WaitOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn rename_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_new_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rename_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_new_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
POST /containers/{id}/rename?name=<new> endpoint. Read moreSource§fn get_container_port_override<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Option<u16>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_container_port_override<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Option<u16>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn sync_container_volumes<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sync_container_volumes<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn inspect_image_native<'life0, 'life1, 'async_trait>(
&'life0 self,
_image: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ImageInspectInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn inspect_image_native<'life0, 'life1, 'async_trait>(
&'life0 self,
_image: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ImageInspectInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn image_history<'life0, 'life1, 'async_trait>(
&'life0 self,
_image: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ImageHistoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn image_history<'life0, 'life1, 'async_trait>(
&'life0 self,
_image: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ImageHistoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn search_images<'life0, 'life1, 'async_trait>(
&'life0 self,
_term: &'life1 str,
_limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<ImageSearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_images<'life0, 'life1, 'async_trait>(
&'life0 self,
_term: &'life1 str,
_limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<ImageSearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
term. Read moreSource§fn save_images<'life0, 'life1, 'async_trait>(
&'life0 self,
_names: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<ImageExportStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_images<'life0, 'life1, 'async_trait>(
&'life0 self,
_names: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<ImageExportStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_images<'life0, 'async_trait>(
&'life0 self,
_tar_bytes: Bytes,
_quiet: bool,
) -> Pin<Box<dyn Future<Output = Result<LoadProgressStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_images<'life0, 'async_trait>(
&'life0 self,
_tar_bytes: Bytes,
_quiet: bool,
) -> Pin<Box<dyn Future<Output = Result<LoadProgressStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn import_image<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tar_bytes: Bytes,
_repo: Option<&'life1 str>,
_tag: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn import_image<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_tar_bytes: Bytes,
_repo: Option<&'life1 str>,
_tag: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn export_container_fs<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<ImageExportStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn export_container_fs<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<ImageExportStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn commit_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_opts: &'life2 CommitOptions,
) -> Pin<Box<dyn Future<Output = Result<CommitOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn commit_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_opts: &'life2 CommitOptions,
) -> Pin<Box<dyn Future<Output = Result<CommitOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn inspect_detailed<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<ContainerInspectDetails>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn inspect_detailed<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<ContainerInspectDetails>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn pause_container<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pause_container<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn unpause_container<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unpause_container<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn update_container_resources<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_update: &'life2 ContainerResourceUpdate,
) -> Pin<Box<dyn Future<Output = Result<ContainerUpdateOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_container_resources<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_update: &'life2 ContainerResourceUpdate,
) -> Pin<Box<dyn Future<Output = Result<ContainerUpdateOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn top_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_ps_args: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<ContainerTopOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn top_container<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_ps_args: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<ContainerTopOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
docker top). Read moreSource§fn changes_container<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Vec<FilesystemChangeEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn changes_container<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Vec<FilesystemChangeEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn port_mappings_container<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Vec<PortMappingEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn port_mappings_container<'life0, 'life1, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
) -> Pin<Box<dyn Future<Output = Result<Vec<PortMappingEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn prune_containers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ContainerPruneResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prune_containers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ContainerPruneResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_containers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeContainerSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_containers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<RuntimeContainerSummary>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
list_containers(all=true) semantics). Read moreSource§fn archive_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ArchiveStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn archive_get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ArchiveStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
path inside the
container. Read moreSource§fn archive_put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_path: &'life2 str,
_tar_bytes: Bytes,
_opts: ArchivePutOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn archive_put<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_path: &'life2 str,
_tar_bytes: Bytes,
_opts: ArchivePutOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
path. Read moreSource§fn archive_head<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PathStat>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn archive_head<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_id: &'life1 ContainerId,
_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PathStat>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
path inside the
container. Read moreAuto Trait Implementations§
impl !Freeze for MockRuntime
impl !RefUnwindSafe for MockRuntime
impl Send for MockRuntime
impl Sync for MockRuntime
impl Unpin for MockRuntime
impl UnsafeUnpin for MockRuntime
impl !UnwindSafe for MockRuntime
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
Source§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
Source§fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Source§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
Source§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Source§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
Source§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
Source§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
Source§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
Source§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Source§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Source§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Source§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
x-request-id as the header name. Read moreSource§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
Source§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
x-request-id as the header name. Read moreSource§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
500 Internal Server responses. Read moreSource§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
413 Payload Too Large responses. Read more