Skip to main content

LocalExecutionBackendRouter

Struct LocalExecutionBackendRouter 

Source
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

Source

pub fn new( legacy: Arc<dyn LocalExecutionBackend>, oci: Arc<dyn LocalExecutionBackend>, policy: OciMigrationPolicy, ) -> Self

Compose the two implementations behind one immutable creation policy.

Source

pub const fn policy(&self) -> OciMigrationPolicy

Policy used only for records created by this router.

Trait Implementations§

Source§

impl Clone for LocalExecutionBackendRouter

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl LocalExecutionBackend for LocalExecutionBackendRouter

Source§

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,

Reject an unsupported execution before its durable reservation is published. Backends must repeat mutable capability checks at launch.
Source§

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,

Source§

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,

Source§

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,

Source§

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

Stop the current runtime while preserving execution-owned storage for the replacement generation.
Source§

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,

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more