pub struct LogicalRuntime { /* private fields */ }Expand description
The adapter.
Implementations§
Source§impl LogicalRuntime
impl LogicalRuntime
Sourcepub fn wasmtime_project(launcher: Arc<dyn ChildLauncher>) -> Self
pub fn wasmtime_project(launcher: Arc<dyn ChildLauncher>) -> Self
Persistent Wasmtime project lifecycle, using a dedicated runner launcher. Shares process bookkeeping only; admission, capability and evidence carry the explicit Wasmtime identity and reject logical payloads.
Sourcepub fn new(launcher: Arc<dyn ChildLauncher>) -> Self
pub fn new(launcher: Arc<dyn ChildLauncher>) -> Self
An adapter over launcher.
Trait Implementations§
Source§impl WorkloadRuntime for LogicalRuntime
impl WorkloadRuntime for LogicalRuntime
Source§fn provides(&self) -> Vec<Capability>
fn provides(&self) -> Vec<Capability>
Capabilities a node advertises when this adapter works.
Source§fn admit<'life0, 'life1, 'async_trait>(
&'life0 self,
w: &'life1 VerifiedWorkload,
) -> Pin<Box<dyn Future<Output = Result<Admission, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn admit<'life0, 'life1, 'async_trait>(
&'life0 self,
w: &'life1 VerifiedWorkload,
) -> Pin<Box<dyn Future<Output = Result<Admission, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self-check: can this node run
w? Reserves nothing it cannot undo.Source§fn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
w: &'life1 VerifiedWorkload,
_cfg: &'life2 WorkloadConfig,
) -> Pin<Box<dyn Future<Output = Result<InstanceHandle, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn load<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
w: &'life1 VerifiedWorkload,
_cfg: &'life2 WorkloadConfig,
) -> Pin<Box<dyn Future<Output = Result<InstanceHandle, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stage the payload and config; returns a handle for the instance.
Source§fn start<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 InstanceHandle,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 InstanceHandle,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start the instance.
Source§fn stop<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 InstanceHandle,
grace: Duration,
) -> Pin<Box<dyn Future<Output = Result<RunEvidence, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stop<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 InstanceHandle,
grace: Duration,
) -> Pin<Box<dyn Future<Output = Result<RunEvidence, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stop it (terminate, then kill after
grace) and return evidence.Source§fn unload<'life0, 'async_trait>(
&'life0 self,
h: InstanceHandle,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unload<'life0, 'async_trait>(
&'life0 self,
h: InstanceHandle,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove staged payload and state.
Source§fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 InstanceHandle,
) -> Pin<Box<dyn Future<Output = InstanceStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
h: &'life1 InstanceHandle,
) -> Pin<Box<dyn Future<Output = InstanceStatus> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Current status.
Source§fn control_mode(&self) -> ControlMode
fn control_mode(&self) -> ControlMode
Managed or adopted.
Source§fn network_exposure(&self) -> NetworkPolicy
fn network_exposure(&self) -> NetworkPolicy
Network exposure instances of this adapter actually get, reported
to the gate as the request’s
network (never assumed).Source§fn console<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_h: &'life1 InstanceHandle,
_command: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<RunEvidence, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn console<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_h: &'life1 InstanceHandle,
_command: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<RunEvidence, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run one console cycle (
[console] limits apply). command must be
one of the cog’s [console].allowed_commands.Source§fn staged_payload<'life0, 'life1, 'async_trait>(
&'life0 self,
_h: &'life1 InstanceHandle,
) -> Pin<Box<dyn Future<Output = Option<PathBuf>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn staged_payload<'life0, 'life1, 'async_trait>(
&'life0 self,
_h: &'life1 InstanceHandle,
) -> Pin<Box<dyn Future<Output = Option<PathBuf>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The file an instance’s binary was staged to, when the adapter runs it
from disk (the licence run gate rehashes it at each start).
None:
not run from a file this node can read (a container image is tagged
by the binary’s BLAKE3; a remote device holds its own copy).Source§fn link_security(&self) -> LinkSecurity
fn link_security(&self) -> LinkSecurity
How the link to a remote device is authenticated. Fails closed:
only a remote adapter with a pinned transport says
Pinned.Source§fn adopt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
h: &'life1 InstanceHandle,
_w: &'life2 VerifiedWorkload,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn adopt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
h: &'life1 InstanceHandle,
_w: &'life2 VerifiedWorkload,
) -> Pin<Box<dyn Future<Output = Result<(), RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Re-attach an instance this adapter loaded before the controller
restarted (its in-memory table is gone but the device still holds
it). The adapter verifies the instance is still there and still the
pinned version, so
stop / unload work again; it starts and
changes nothing on the device.Source§fn console_preemptions<'life0, 'life1, 'async_trait>(
&'life0 self,
_h: &'life1 InstanceHandle,
) -> Pin<Box<dyn Future<Output = Result<Vec<Preemption>, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn console_preemptions<'life0, 'life1, 'async_trait>(
&'life0 self,
_h: &'life1 InstanceHandle,
) -> Pin<Box<dyn Future<Output = Result<Vec<Preemption>, RuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Instances that must stop before a console run of
h. The host
gates each one as workload.stop before calling Self::preempt.Auto Trait Implementations§
impl !Freeze for LogicalRuntime
impl !RefUnwindSafe for LogicalRuntime
impl !UnwindSafe for LogicalRuntime
impl Send for LogicalRuntime
impl Sync for LogicalRuntime
impl Unpin for LogicalRuntime
impl UnsafeUnpin for LogicalRuntime
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
Mutably borrows from an owned value. Read more
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