pub struct RedisLivenessStore { /* private fields */ }Expand description
Redis implementation of the LivenessStore trait.
Implementations§
Source§impl RedisLivenessStore
impl RedisLivenessStore
Sourcepub fn new(client: RedisClient) -> Self
pub fn new(client: RedisClient) -> Self
Create a new Redis liveness store with the given client.
Trait Implementations§
Source§impl Clone for RedisLivenessStore
impl Clone for RedisLivenessStore
Source§fn clone(&self) -> RedisLivenessStore
fn clone(&self) -> RedisLivenessStore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl LivenessStore for RedisLivenessStore
impl LivenessStore for RedisLivenessStore
Source§fn update_heartbeat<'life0, 'async_trait>(
&'life0 self,
worker_id: usize,
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_heartbeat<'life0, 'async_trait>(
&'life0 self,
worker_id: usize,
timestamp: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update the heartbeat timestamp for a worker.
Source§fn get_heartbeat<'life0, 'async_trait>(
&'life0 self,
worker_id: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<DateTime<Utc>>, LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_heartbeat<'life0, 'async_trait>(
&'life0 self,
worker_id: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<DateTime<Utc>>, LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the last heartbeat timestamp for a worker.
Source§fn list_workers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<usize>, LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_workers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<usize>, LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all known worker IDs.
Source§fn update_health<'life0, 'async_trait>(
&'life0 self,
worker_id: usize,
health: WorkerHealth,
) -> Pin<Box<dyn Future<Output = Result<(), LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_health<'life0, 'async_trait>(
&'life0 self,
worker_id: usize,
health: WorkerHealth,
) -> Pin<Box<dyn Future<Output = Result<(), LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update the health status for a worker.
Source§fn get_health<'life0, 'async_trait>(
&'life0 self,
worker_id: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkerHealth>, LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_health<'life0, 'async_trait>(
&'life0 self,
worker_id: usize,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkerHealth>, LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the health status for a worker.
Source§fn list_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkerHealth>, LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_health<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkerHealth>, LivenessStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List health status for all workers.
Auto Trait Implementations§
impl Freeze for RedisLivenessStore
impl !RefUnwindSafe for RedisLivenessStore
impl Send for RedisLivenessStore
impl Sync for RedisLivenessStore
impl Unpin for RedisLivenessStore
impl !UnwindSafe for RedisLivenessStore
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