Expand description
Persistence contracts and in-memory event stores for Aion durable workflows.
The crate defines the async event-store traits used by the engine, visibility
records for workflow listings, timer records, run-chain summaries, and a
correct InMemoryStore reference implementation for tests and development.
§Example
use aion_store::{InMemoryStore, ReadableEventStore, WorkflowId};
let store = InMemoryStore::default();
let workflow_id = WorkflowId::new_v4();
let history = store.read_history(&workflow_id).await?;
assert!(history.is_empty());Re-exports§
pub use error::StoreError;pub use memory::InMemoryStore;pub use namespace::MintOutcome;pub use namespace::NamespaceConfig;pub use namespace::NamespaceOrigin;pub use namespace::NamespacePlacement;pub use namespace::NamespaceRecord;pub use namespace::NamespaceState;pub use namespace::NamespaceStore;pub use observability::ActivityRecord;pub use observability::ActivityStreamKey;pub use observability::ActivityStreamSummary;pub use observability::InMemoryObservabilityStore;pub use observability::ObservabilityStore;pub use outbox::ClaimScope;pub use outbox::DEFAULT_OUTBOX_ROUTE;pub use outbox::OutboxRow;pub use outbox::OutboxStatus;pub use outbox::OutboxStore;pub use package::PackageRecord;pub use package::PackageRouteRecord;pub use package::PackageStore;pub use store::EventStore;pub use store::ReadableEventStore;pub use store::RunSummary;pub use store::WritableEventStore;pub use store::WriteToken;pub use timer::TimerEntry;pub use visibility::ListWorkflowsFilter;pub use visibility::SearchAttributePredicate;pub use visibility::VisibilityRecord;pub use visibility::VisibilityStore;pub use visibility::WorkflowSummary as VisibilityWorkflowSummary;
Modules§
- conformance
- Backend conformance helpers shared by event-store implementations.
Reusable behavioural conformance suite for
EventStoreimplementations. - error
- Store-level error taxonomy.
StoreErrortaxonomy. - memory
- In-memory reference implementation of the store contracts.
InMemoryStorereference implementation and behavioural test suite. - namespace
- Durable, minted-on-use namespace registry records and contract. Durable, minted-on-use namespace registry contract (Control-Plane Phase 1).
- observability
- Durable observability (
O) keyspace contract — the NOI-5 transcript spine. The durable observability (O) keyspace contract — NOI-5’s durability spine. - outbox
- Durable outbox contract for store-backed fan-out dispatch. Durable outbox contract for store-backed fan-out dispatch.
- package
- Deployed-package persistence records and contract. Deployed-package persistence contract.
- run_
chain - Run-chain summaries used for workflow execution lineage. Run-chain projection helpers shared by store implementations.
- store
- Core readable and writable event-store traits. Event-store traits and single-writer capability.
- timer
- Timer persistence records and queries.
TimerEntryand timer-facing types. - visibility
- Workflow visibility records, predicates, and list filters. Visibility-store contracts and query projection types.
Structs§
- Event
Envelope - Metadata recorded with every workflow history event.
- Payload
- Type-erased user data with an explicit content type tag.
- RunId
- Identifier for a concrete run of a logical workflow.
- TimerId
- Identifier for a timer scheduled by workflow code or by the engine.
- Workflow
Error - Terminal failure reported by a workflow execution.
- Workflow
Filter - Query input for listing workflow executions.
- Workflow
Id - Identifier for a logical workflow.
- Workflow
Summary - Lightweight projection of a workflow execution for query results.
Enums§
- Content
Type - Stable tag describing the encoding used for a payload’s bytes.
- Event
- A recorded workflow history event.
- Workflow
Status - Projected lifecycle status for a workflow execution.
Functions§
- status_
from_ events - Projects workflow status from an event history.