pub struct RedisIdempotencyStore { /* private fields */ }Expand description
IdempotencyStore in Redis. Pair it with
Idempotency::shared_seed so
all instances hash scopes and payloads alike. Fails closed: when Redis is
unreachable requests get 503.
Implementations§
Trait Implementations§
Source§impl IdempotencyStore for RedisIdempotencyStore
impl IdempotencyStore for RedisIdempotencyStore
Source§fn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
fingerprint: u64,
lock_ttl: Duration,
) -> Pin<Box<dyn Future<Output = Begin> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn begin<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
fingerprint: u64,
lock_ttl: Duration,
) -> Pin<Box<dyn Future<Output = Begin> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Claim
key for a request with this fingerprint. A claim that is never
completed must lapse after lock_ttl.Auto Trait Implementations§
impl !Freeze for RedisIdempotencyStore
impl RefUnwindSafe for RedisIdempotencyStore
impl Send for RedisIdempotencyStore
impl Sync for RedisIdempotencyStore
impl Unpin for RedisIdempotencyStore
impl UnsafeUnpin for RedisIdempotencyStore
impl UnwindSafe for RedisIdempotencyStore
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