Skip to main content

Crate aion_store

Crate aion_store 

Source
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 EventStore implementations.
error
Store-level error taxonomy. StoreError taxonomy.
memory
In-memory reference implementation of the store contracts. InMemoryStore reference 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. TimerEntry and timer-facing types.
visibility
Workflow visibility records, predicates, and list filters. Visibility-store contracts and query projection types.

Structs§

EventEnvelope
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.
WorkflowError
Terminal failure reported by a workflow execution.
WorkflowFilter
Query input for listing workflow executions.
WorkflowId
Identifier for a logical workflow.
WorkflowSummary
Lightweight projection of a workflow execution for query results.

Enums§

ContentType
Stable tag describing the encoding used for a payload’s bytes.
Event
A recorded workflow history event.
WorkflowStatus
Projected lifecycle status for a workflow execution.

Functions§

status_from_events
Projects workflow status from an event history.