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 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. - 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.
- 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.