pub struct LoopingJobService { /* private fields */ }Implementations§
Source§impl LoopingJobService
impl LoopingJobService
pub fn new<J: Job + 'static>(job: J, config: LoopConfig) -> Self
Trait Implementations§
Source§impl From<Arc<dyn LoopableJob>> for LoopingJobService
impl From<Arc<dyn LoopableJob>> for LoopingJobService
Source§fn from(job: Arc<dyn LoopableJob>) -> Self
fn from(job: Arc<dyn LoopableJob>) -> Self
Converts to this type from the input type.
Source§impl<J: LoopableJob + 'static> From<J> for LoopingJobService
impl<J: LoopableJob + 'static> From<J> for LoopingJobService
Source§impl Job for LoopingJobService
impl Job for LoopingJobService
Source§impl Service for LoopingJobService
impl Service for LoopingJobService
Source§fn run_forever<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Never> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_forever<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Never> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
The service is never expected to stop, it should do its job until
externally shutdown.
Source§fn set_heartbeat(&mut self, heartbeat: Arc<dyn Heartbeat>)
fn set_heartbeat(&mut self, heartbeat: Arc<dyn Heartbeat>)
The service should frequently call “beat” to indicate that it is still
alive.
Source§fn heartbeat_ttl(&self) -> i32
fn heartbeat_ttl(&self) -> i32
The maximum amount of seconds allowed between heartbeats before the
service is deemed “dead”
Source§fn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
The service should be able to self-diagnose any internal issues and
report if there is a problem.
Auto Trait Implementations§
impl !Freeze for LoopingJobService
impl !RefUnwindSafe for LoopingJobService
impl !UnwindSafe for LoopingJobService
impl Send for LoopingJobService
impl Sync for LoopingJobService
impl Unpin for LoopingJobService
impl UnsafeUnpin for LoopingJobService
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