pub struct MemoryLeaseStore { /* private fields */ }Expand description
In-process lease table for lab and unit tests.
Implementations§
Trait Implementations§
Source§impl Default for MemoryLeaseStore
impl Default for MemoryLeaseStore
Source§impl LeaseStore for MemoryLeaseStore
impl LeaseStore for MemoryLeaseStore
Source§fn claim<'life0, 'async_trait>(
&'life0 self,
lease: ConsumerLease,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn claim<'life0, 'async_trait>(
&'life0 self,
lease: ConsumerLease,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Claim a shard lease for an instance (fails if held by another live member).
Source§fn renew<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_id: &'life1 str,
instance_id: &'life2 str,
ttl_secs: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn renew<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_id: &'life1 str,
instance_id: &'life2 str,
ttl_secs: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Renew all leases held by an instance in the group.
Source§fn release<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_id: &'life1 str,
instance_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn release<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_id: &'life1 str,
instance_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Release all leases held by an instance in the group.
Source§fn list_for_instance<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_id: &'life1 str,
instance_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_for_instance<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
group_id: &'life1 str,
instance_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u32>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List live shard ids leased by an instance.
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryLeaseStore
impl !UnwindSafe for MemoryLeaseStore
impl Freeze for MemoryLeaseStore
impl Send for MemoryLeaseStore
impl Sync for MemoryLeaseStore
impl Unpin for MemoryLeaseStore
impl UnsafeUnpin for MemoryLeaseStore
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