pub struct NodeComputeControl { /* private fields */ }Expand description
The node’s ComputeControl: restart a
replica (stop it + drop its observed state so the reconcile loop relaunches it).
Backs POST /api/compute/maintenance/restart (admin-scoped). Resolves the target
replica’s backend from its persisted state and calls
ComputeBackend::stop; the server
nudges the reconcile loop afterwards so relaunch is prompt.
Implementations§
Source§impl NodeComputeControl
impl NodeComputeControl
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. Clone the registry before the reconcile loop consumes the original.
Trait Implementations§
Source§impl ComputeControl for NodeComputeControl
impl ComputeControl for NodeComputeControl
Source§fn restart<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
workload: &'life2 str,
replica: u32,
) -> Pin<Box<dyn Future<Output = Result<bool, ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn restart<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
workload: &'life2 str,
replica: u32,
) -> Pin<Box<dyn Future<Output = Result<bool, ControlError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Restart replica
replica of workload in project: stop it and delete its
observed state so the reconcile loop relaunches it. Ok(false) if no such
replica is persisted (nothing to restart).Auto Trait Implementations§
impl !RefUnwindSafe for NodeComputeControl
impl !UnwindSafe for NodeComputeControl
impl Freeze for NodeComputeControl
impl Send for NodeComputeControl
impl Sync for NodeComputeControl
impl Unpin for NodeComputeControl
impl UnsafeUnpin for NodeComputeControl
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