Struct app_frame::service_manager::ServiceManager
source · pub struct ServiceManager { /* private fields */ }Expand description
Manages services: start/stop/monitor
Implementations§
source§impl ServiceManager
impl ServiceManager
pub fn register_service(&mut self, service: Box<dyn Service>)
pub async fn spawn_services(&mut self) -> Result<()>
pub async fn monitor(&self, check_interval: u64, log_interval: i32) -> Never
sourcepub async fn monitor_with_recovery(
&self,
check_interval: u64,
log_interval: i32
) -> Never
pub async fn monitor_with_recovery( &self, check_interval: u64, log_interval: i32 ) -> Never
If a service is dead for over two minutes, try to restart it.
pub fn check(&self) -> ServiceReportSummary
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceManager
impl Send for ServiceManager
impl Sync for ServiceManager
impl Unpin for ServiceManager
impl !UnwindSafe for ServiceManager
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