pub struct NodeComputeExec { /* private fields */ }Expand description
The node’s ComputeExec: resolve a
workload’s running replica from the control-plane state, pick its backend, and
run the command inside it. Backs POST /api/compute/{name}/exec; the API gates
it behind the allow_compute_exec posture. Only the shared-kernel backends
(native container, remote docker) actually implement
ComputeBackend::exec; the rest
surface as ExecError::Unsupported.
Implementations§
Source§impl NodeComputeExec
impl NodeComputeExec
Sourcepub fn new(backends: BackendRegistry, deploy: DeployStore) -> Self
pub fn new(backends: BackendRegistry, deploy: DeployStore) -> Self
Build over this node’s compute backends + the control-plane store. The
registry is a cheap BTreeMap of Arc backends (clone it before the
reconcile loop consumes the original).
Trait Implementations§
Source§impl ComputeExec for NodeComputeExec
impl ComputeExec for NodeComputeExec
Source§fn exec<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
project: &'life1 str,
workload: &'life2 str,
argv: &'life3 [String],
stdin: Option<&'life4 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<ExecOutput, ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn exec<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
project: &'life1 str,
workload: &'life2 str,
argv: &'life3 [String],
stdin: Option<&'life4 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<ExecOutput, ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Run
argv (feeding stdin when present) inside a running replica of
workload in project, returning its buffered output.Auto Trait Implementations§
impl !RefUnwindSafe for NodeComputeExec
impl !UnwindSafe for NodeComputeExec
impl Freeze for NodeComputeExec
impl Send for NodeComputeExec
impl Sync for NodeComputeExec
impl Unpin for NodeComputeExec
impl UnsafeUnpin for NodeComputeExec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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