Skip to main content

LocalExecutionBackend

Trait LocalExecutionBackend 

Source
pub trait LocalExecutionBackend: Send + Sync {
Show 21 methods // Required methods 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; 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; // Provided methods fn route_for_create( &self, _record: &BoxRecord, ) -> ExecutionManagerResult<ManagedRuntimeRoute> { ... } 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_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 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 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 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 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 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 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_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 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 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 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 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 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 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 { ... }
}
Expand description

Backend operations invoked outside the durable state lock.

Implementations must key all host/runtime paths by BoxRecord::id. The external sandbox ID in managed metadata is an untrusted diagnostic label.

Required Methods§

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 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,

Provided Methods§

Source

fn route_for_create( &self, _record: &BoxRecord, ) -> ExecutionManagerResult<ManagedRuntimeRoute>

Select the durable route for a new record before capability preflight.

Custom test or embedding backends may leave the route unspecified. Box production backends must return an exact route so a later policy change cannot reinterpret a claimed or stopped generation.

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 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_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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§