Skip to main content

Module store

Module store 

Source
Expand description

Task storage backend.

Modules§

applied
The log position a write folds, carried into the store the way the tenant is (TenantContext): a task-local, so no write method’s signature changes.
caller_keys
Moving stored caller partitions to the identities of 0.15 (audit register R12).
claim
Turn claims: one replica at a time runs a task, however many share its store.
encryptedencryption
Encryption at rest for what a task carries.
halt
Halts that every replica sees and a restart keeps (ADR 0019).
holds
Holds on a task’s event log: the positions an attached stream still owes, which the log’s bound must not drop (spec §3.5.2: “Each stream MUST receive the same events in the same order”).
lease
Where the leases of delegated tasks are kept (ADR 0020).
migrationsqlite
Schema versioning and migration support for SqliteTaskStore.
pg_migrationpostgres
Schema versioning and migration support for PostgresTaskStore.
postgres_storepostgres
PostgreSQL-backed TaskStore implementation.
retention
Retention for the persistent task stores.
sqlite_storesqlite
SQLite-backed TaskStore implementation.
task_store
Task persistence trait and in-memory implementation.
tenant
Tenant-scoped task store implementations.
tenant_postgres_storepostgres
Tenant-scoped PostgreSQL-backed TaskStore implementation.
tenant_sqlite_storesqlite
Tenant-scoped SQLite-backed TaskStore implementation.
terminal
Terminal states are final in the store, not only in the handler.

Structs§

AppliedPosition
The log position the current write folds, if any; see the module documentation.
ClaimLost
A turn’s write was refused because its claim on the task was taken over: another replica runs the task now. See the module documentation.
EventHold
One stream’s hold on a task’s event log; see EventHolds.
EventHolds
The holds attached streams have on one store’s event logs, per task.
HeldClaim
A claim the owner still holds, as a renewal reports it.
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.
InMemoryHaltStore
Halts kept in memory, shared by every handler holding a clone: one process’s replicas in a test, or a stand-in where nothing must survive a restart.
InMemoryLeaseStore
Leases kept in memory, shared by every handler holding a clone.
InMemoryTaskStore
In-memory TaskStore backed by a pre-allocated HashMap with secondary indexes under a single [RwLock].
InMemoryTurnClaims
Claims in process memory, for tests that run several handlers over one in-memory store. Expiry is measured on this process’s monotonic clock.
Migration
A single schema migration.
MigrationRunner
Runs schema migrations against a SQLite database.
PendingSteering
A steering message stored for the turn that holds token, as TurnClaimStore::peek_steering reports it.
PgMigration
A single schema migration.
PgMigrationRunner
Runs schema migrations against a PostgreSQL database.
PostgresDelegationJournal
Delegation records in a PostgreSQL table, a2a_delegations.
PostgresHaltStore
Halts in a PostgreSQL table, a2a_halts, created if absent.
PostgresLeaseStore
Leases in a PostgreSQL table, a2a_leases, created if absent.
PostgresTaskStore
PostgreSQL-backed TaskStore.
PurgeReport
What one call to purge_expired did.
RecordedEvent
One event as the log holds it: what was emitted, and where in the order.
RetentionPolicy
How long terminal tasks are kept, and how aggressively they are removed.
SqliteDelegationJournal
Delegation records in a SQLite table, a2a_delegations, created if absent.
SqliteHaltStore
Halts in a SQLite table, a2a_halts, created if absent.
SqliteTaskStore
SQLite-backed TaskStore.
StoreDatabase
The database behind a task store: what its spans and its db.client.operation.duration measurements say they ran against (docs/db/database-spans.md, open-telemetry/semantic-conventions@55c98cf).
StoredHalt
A halt as a HaltStore keeps it.
TaskStoreConfig
Configuration for InMemoryTaskStore.
TenantAwareInMemoryTaskStore
Tenant-isolated in-memory TaskStore.
TenantAwarePostgresTaskStore
Tenant-scoped PostgreSQL-backed TaskStore.
TenantAwareSqliteTaskStore
Tenant-scoped SQLite-backed TaskStore.
TenantContext
Thread-safe tenant context for scoping store operations.
TenantStoreConfig
Configuration for TenantAwareInMemoryTaskStore.
TerminalStateConflict
A write the store refused because the task it names is already terminal.

Enums§

ArtifactDelta
What changed in a task’s artifacts, for TaskStore::save_artifact_delta.
HaltSignal
What a pushing HaltStore tells the handlers sharing it (ADR 0024).
Handed
What TurnClaimStore::hand_steering did with a message.
IdempotencyClaim
What happened when a store was asked to claim an idempotency key.
LogListen
Where the listener of a store’s log notifications gets its session (PostgresTaskStore::with_log_notifications).
LogWake
Why a wait on a task’s event log ended.

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_HELD_EVENTS_FACTOR
How many times max_events_per_task a task’s log may hold while an attached stream still owes its oldest events, when nothing else is asked for: 8, so 4,096 events at the default bound.
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.
DEFAULT_POOL_SIZEpostgres
How many connections a PostgreSQL store’s own pool opens, unless given another size (new_with_pool_size).
LOG_NOTIFY_CHANNEL
The channel an append is announced on. The payload is the task’s key.
TERMINAL_STATE_CONFLICT_MARKER
Key in A2aError::data marking a write refused because the stored task is already terminal. Prefer TerminalStateConflict::from_error over matching this string.

Statics§

BUILTIN_PG_MIGRATIONS
Built-in migrations for the PostgresTaskStore schema.

Traits§

HaltStore
Where halts are kept so that every replica sees them and a restart keeps them.
LeaseStore
Where leases are kept: a time to live and a deadline per task, keyed by tenant ("" without one) and task id.
TaskStore
Trait for persisting and retrieving Task objects.
TurnClaimStore
Where turn claims are kept. See the module documentation.

Functions§

refuses_write
Whether a write carrying written must be refused over a task stored in stored.
terminal_states
The states a purge is allowed to delete.

Type Aliases§

LogWatch
A registered interest in one task’s event log, from TaskStore::watch_event_log.