pub struct LocalExecutionBackendRouter { /* private fields */ }Expand description
One fail-closed backend router that supports mixed legacy and OCI records.
The router never attempts the alternate backend after an error. A policy selects only new records; explicit record metadata owns every later call.
Implementations§
Source§impl LocalExecutionBackendRouter
impl LocalExecutionBackendRouter
Sourcepub fn new(
legacy: Arc<dyn LocalExecutionBackend>,
oci: Arc<dyn LocalExecutionBackend>,
policy: OciMigrationPolicy,
) -> Self
pub fn new( legacy: Arc<dyn LocalExecutionBackend>, oci: Arc<dyn LocalExecutionBackend>, policy: OciMigrationPolicy, ) -> Self
Compose the two implementations behind one immutable creation policy.
Sourcepub const fn policy(&self) -> OciMigrationPolicy
pub const fn policy(&self) -> OciMigrationPolicy
Policy used only for records created by this router.
Trait Implementations§
Source§impl Clone for LocalExecutionBackendRouter
impl Clone for LocalExecutionBackendRouter
Source§fn clone(&self) -> LocalExecutionBackendRouter
fn clone(&self) -> LocalExecutionBackendRouter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl LocalExecutionBackend for LocalExecutionBackendRouter
impl LocalExecutionBackend for LocalExecutionBackendRouter
Source§fn route_for_create(
&self,
record: &BoxRecord,
) -> ExecutionManagerResult<ManagedRuntimeRoute>
fn route_for_create( &self, record: &BoxRecord, ) -> ExecutionManagerResult<ManagedRuntimeRoute>
Select the durable route for a new record before capability preflight. Read more
Source§fn preflight<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn preflight<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reject an unsupported execution before its durable reservation is
published. Backends must repeat mutable capability checks at launch.
fn start<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<LocalExecutionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn inspect<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<LocalExecutionObservation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn pause<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
keep_memory: bool,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<LocalExecutionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resume<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<LocalExecutionHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn preflight_resource_update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
update: &'life2 ExecutionResourceUpdate,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn preflight_resource_update<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
update: &'life2 ExecutionResourceUpdate,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Validate a complete live resource contract before a durable mutation claim.
Source§fn update_resources<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
operation_id: &'life2 OperationId,
update: &'life3 ExecutionResourceUpdate,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_resources<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
operation_id: &'life2 OperationId,
update: &'life3 ExecutionResourceUpdate,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Apply the exact persisted resource update operation.
Source§fn list_processes<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionProcessInventory>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_processes<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionProcessInventory>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return live init and exec processes for the record’s exact runtime target.
Source§fn stats<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stats<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return normalized counters for the record’s exact runtime target.
Source§fn events<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: ExecutionEventsRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionEventBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn events<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: ExecutionEventsRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionEventBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Poll ordered events for the record’s exact runtime target.
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: ExecRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: ExecRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute one captured process through a backend-owned, generation-fenced
session boundary. The legacy VM backend retains its socket transport;
SDK-backed implementations override this method.
Source§fn start_process<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: ExecRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionProcess>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_process<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: ExecRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionProcess>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start one streaming non-terminal process through the backend boundary.
Source§fn start_pty<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: PtyRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionProcess>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_pty<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: PtyRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<ExecutionProcess>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start one interactive terminal process through the backend boundary.
Source§fn transfer_file<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: FileRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<FileResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn transfer_file<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: FileRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<FileResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Transfer one file through the backend’s exact-generation session.
Source§fn filesystem<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: FilesystemRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<FilesystemResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn filesystem<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
request: FilesystemRequest,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<FilesystemResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inspect or mutate the exact generation’s workload filesystem.
Source§fn prepare_quiescent_rootfs<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn prepare_quiescent_rootfs<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Make a stopped, storage-retained rootfs available for a filesystem
snapshot without starting the execution runtime.
Source§fn cleanup_quiescent_rootfs<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cleanup_quiescent_rootfs<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release any transient rootfs mount created by
Self::prepare_quiescent_rootfs while retaining guest data.Source§fn stop_for_restart<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
timeout_secs: Option<u64>,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<KillOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stop_for_restart<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
timeout_secs: Option<u64>,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<KillOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stop the current runtime while preserving execution-owned storage for
the replacement generation.
fn kill<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<KillOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn kill_with_status<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<LocalExecutionTermination>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn kill_with_status<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 BoxRecord,
) -> Pin<Box<dyn Future<Output = ExecutionManagerResult<LocalExecutionTermination>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Kill the current execution and return its exact terminal status when the
backend provides one. Implementations that cannot observe status retain
the legacy
kill behavior through this default.Auto Trait Implementations§
impl !RefUnwindSafe for LocalExecutionBackendRouter
impl !UnwindSafe for LocalExecutionBackendRouter
impl Freeze for LocalExecutionBackendRouter
impl Send for LocalExecutionBackendRouter
impl Sync for LocalExecutionBackendRouter
impl Unpin for LocalExecutionBackendRouter
impl UnsafeUnpin for LocalExecutionBackendRouter
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 more