pub struct Lifecycle<'runtime> {
pub store: &'runtime StateStore,
pub registry: &'runtime Registry<'runtime>,
pub probe: &'runtime dyn ProcessProbe,
}Fields§
§store: &'runtime StateStore§registry: &'runtime Registry<'runtime>§probe: &'runtime dyn ProcessProbeImplementations§
Source§impl Lifecycle<'_>
impl Lifecycle<'_>
pub async fn health( &self, active: &ServerState, request: &ServeRequest, cancel: &CancellationToken, ) -> Result<(), BackendError>
Sourcepub async fn forget_attached(
&self,
cancel: &CancellationToken,
) -> Result<Option<ServerState>, BackendError>
pub async fn forget_attached( &self, cancel: &CancellationToken, ) -> Result<Option<ServerState>, BackendError>
Clears an attached (not owned) pointer under the state lock without probing or signalling any process.
Sourcepub async fn forget_dead(
&self,
cancel: &CancellationToken,
) -> Result<Option<ServerState>, BackendError>
pub async fn forget_dead( &self, cancel: &CancellationToken, ) -> Result<Option<ServerState>, BackendError>
Clears a record whose process is provably gone (after a reboot, or when the daemon it attached to exited), so a stale pointer cannot wedge every later launch. Never probes listeners or signals processes; a live PID or unknown liveness keeps the record.
pub async fn review( &self, target: &str, cancel: &CancellationToken, ) -> Result<Reviewed, BackendError>
pub async fn replace( &self, backend: &str, request: &ServeRequest, reviewed: &Reviewed, cancel: &CancellationToken, ) -> Result<ServerState, BackendError>
pub async fn replace_with( &self, backend: &str, request: &ServeRequest, reviewed: &Reviewed, cancel: &CancellationToken, activation: &dyn Activation, ) -> Result<ServerState, BackendError>
pub async fn switch_pointer( &self, target: &str, reviewed: &Reviewed, cancel: &CancellationToken, ) -> Result<ServerState, BackendError>
pub async fn attach_installed( &self, request: &ServeRequest, reviewed: &Reviewed, cancel: &CancellationToken, activation: &dyn Activation, ) -> Result<ServerState, BackendError>
pub async fn down( &self, cancel: &CancellationToken, ) -> Result<Option<ServerState>, BackendError>
pub async fn down_with_target( &self, cancel: &CancellationToken, resolve_target: impl FnOnce() -> Result<Option<String>, BackendError> + Send, ) -> Result<Option<ServerState>, BackendError>
Auto Trait Implementations§
impl<'runtime> !RefUnwindSafe for Lifecycle<'runtime>
impl<'runtime> !UnwindSafe for Lifecycle<'runtime>
impl<'runtime> Forget for Lifecycle<'runtime>
impl<'runtime> Freeze for Lifecycle<'runtime>
impl<'runtime> Send for Lifecycle<'runtime>
impl<'runtime> Sync for Lifecycle<'runtime>
impl<'runtime> Unpin for Lifecycle<'runtime>
impl<'runtime> UnsafeUnpin for Lifecycle<'runtime>
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