Skip to main content

Module idempotency

Module idempotency 

Source
Expand description

Idempotency keys — retry-safe session creation.

When a client provides an idempotency key, the coordinator stores the key → session_id mapping. A retried request with the same key returns the original session instead of creating a duplicate.

§OCP design

The IdempotencyStore trait allows different backends (in-memory, Redis, database). New backends are added by implementing the trait.

Structs§

InMemoryIdempotencyStore
In-memory idempotency store. Thread-safe via Mutex.

Traits§

IdempotencyStore
Trait for idempotency key stores.
IdempotentCoordinator
Extension trait for Coordinator adding idempotent session creation.