hyperlane-plugin-idempotency 22.14.1

A production HTTP Idempotency-Key middleware plugin for the Hyperlane framework featuring XxHash3_64 request fingerprinting (422 mismatch), 64-way sharded bounded InMemoryIdempotencyStore + async IdempotencyStore trait, InFlight concurrent duplicate guard (409 Conflict), and zero-copy cached response replay with Idempotent-Replayed headers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use super::*;

/// Boxed `Send` future returned by asynchronous [`IdempotencyStore`] trait methods.
pub type IdempotencyFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;

/// Thread-safe shared reference to a pluggable [`IdempotencyStore`].
pub type SharedIdempotencyStore = Arc<dyn IdempotencyStore>;

/// 64-way sharded hash table array backing [`InMemoryIdempotencyStore`].
pub(crate) type IdempotencyShardArray =
    Box<[RwLock<HashMapXxHash3_64<String, IdempotencySlot>>; IDEMPOTENCY_SHARD_COUNT]>;