pub struct ServerLifecycle { /* private fields */ }
Expand description
Server lifecycle manager
Implementations§
Source§impl ServerLifecycle
impl ServerLifecycle
Sourcepub async fn state(&self) -> ServerState
pub async fn state(&self) -> ServerState
Get current server state
Sourcepub async fn set_state(&self, state: ServerState)
pub async fn set_state(&self, state: ServerState)
Set server state
Sourcepub fn shutdown_signal(&self) -> ShutdownSignal
pub fn shutdown_signal(&self) -> ShutdownSignal
Subscribe to shutdown signals
Sourcepub async fn health(&self) -> HealthStatus
pub async fn health(&self) -> HealthStatus
Get health status
Sourcepub async fn update_health(&self, healthy: bool, details: Vec<HealthCheck>)
pub async fn update_health(&self, healthy: bool, details: Vec<HealthCheck>)
Update health status
Sourcepub async fn add_health_check(&self, check: HealthCheck)
pub async fn add_health_check(&self, check: HealthCheck)
Add health check
Trait Implementations§
Source§impl Debug for ServerLifecycle
impl Debug for ServerLifecycle
Auto Trait Implementations§
impl Freeze for ServerLifecycle
impl !RefUnwindSafe for ServerLifecycle
impl Send for ServerLifecycle
impl Sync for ServerLifecycle
impl Unpin for ServerLifecycle
impl !UnwindSafe for ServerLifecycle
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