Expand description
Task persistence trait and in-memory implementation.
TaskStore abstracts task persistence so that the server framework can
be backed by any storage engine. InMemoryTaskStore provides a
pre-allocated HashMap-based implementation suitable for testing and
single-process deployments.
Structs§
- History
Limit - The most a task’s
historykeeps: a number of messages and a number of bytes, whichever is reached first. The oldest messages go first. - Idempotency
Holder - Who holds an idempotency key, as
TaskStore::idempotency_holderreads it: the message that claimed the key and the task the claim named. - InMemory
Task Store - In-memory
TaskStorebacked by a pre-allocatedHashMapwith secondary indexes under a single [RwLock]. - Recorded
Event - One event as the log holds it: what was emitted, and where in the order.
- Task
Store Config - Configuration for
InMemoryTaskStore.
Enums§
- Artifact
Delta - What changed in a task’s artifacts, for
TaskStore::save_artifact_delta. - Idempotency
Claim - What happened when a store was asked to claim an idempotency key.
Constants§
- DEFAULT_
IDEMPOTENCY_ KEY_ TTL - How long the in-memory store keeps an idempotency key by default.
- DEFAULT_
MAX_ EVENTS_ PER_ TASK - How many events one task’s log keeps when nothing else is asked for.
- DEFAULT_
MAX_ IDEMPOTENCY_ KEYS - How many idempotency keys the in-memory store holds at most by default.
- DEFAULT_
MAX_ PAGE_ SIZE - The largest page a
listcall may return, when nothing narrower is asked for.