Skip to main content

Module task_store

Module task_store 

Source
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§

HistoryLimit
The most a task’s history keeps: a number of messages and a number of bytes, whichever is reached first. The oldest messages go first.
IdempotencyHolder
Who holds an idempotency key, as TaskStore::idempotency_holder reads it: the message that claimed the key and the task the claim named.
InMemoryTaskStore
In-memory TaskStore backed by a pre-allocated HashMap with secondary indexes under a single [RwLock].
RecordedEvent
One event as the log holds it: what was emitted, and where in the order.
TaskStoreConfig
Configuration for InMemoryTaskStore.

Enums§

ArtifactDelta
What changed in a task’s artifacts, for TaskStore::save_artifact_delta.
IdempotencyClaim
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 list call may return, when nothing narrower is asked for.

Traits§

TaskStore
Trait for persisting and retrieving Task objects.