pub trait ServiceTask {
    fn service_name(&self) -> String;
fn run_service_check<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn should_run(&self) -> bool; fn should_run_last_interval(
        &self,
        last_run: Option<SystemTime>,
        interval: Duration
    ) -> bool { ... } }

Required methods

To identify service task

ServiceTasks are triggered often ( 1s interval ) This method should tell whether run also this ServiceTask in current run.

Provided methods

Should run when elapsed time from last run is higher then interval

Implementors