pub struct LibSqlStore { /* private fields */ }Expand description
Durable EventStore backed by a shared libSQL connection.
Implementations§
Source§impl LibSqlStore
impl LibSqlStore
Sourcepub async fn connect(config: LibSqlConfig) -> Result<Self, StoreError>
pub async fn connect(config: LibSqlConfig) -> Result<Self, StoreError>
Open a store from operator-provided libSQL configuration.
§Errors
Returns StoreError::Backend when the connection cannot be opened or when the idempotent
schema DDL cannot be applied.
Sourcepub async fn open(path: impl Into<PathBuf>) -> Result<Self, StoreError>
pub async fn open(path: impl Into<PathBuf>) -> Result<Self, StoreError>
Open an embedded local-file store at path.
Operator tunables remain unset; this convenience constructor only selects embedded mode.
§Errors
Returns StoreError::Backend when the connection cannot be opened or when the idempotent
schema DDL cannot be applied.
Sourcepub async fn validate_event_compatibility(&self) -> Result<(), StoreError>
pub async fn validate_event_compatibility(&self) -> Result<(), StoreError>
Validate stored event blobs against the current Aion event schema.
§Errors
Returns StoreError::Serialization when any stored event cannot be decoded by the current
event schema, or StoreError::Backend for libSQL scan failures.
Sourcepub async fn sync(&self) -> Result<(), StoreError>
pub async fn sync(&self) -> Result<(), StoreError>
Trigger and await a libSQL replica synchronization cycle.
§Errors
Returns StoreError::Backend when the current libSQL database mode does not support sync or
when the replica sync operation fails.
Sourcepub async fn append_with_outbox(
&self,
_token: WriteToken,
workflow_id: &WorkflowId,
events: &[Event],
expected_seq: u64,
outbox_rows: Option<&[OutboxRow]>,
) -> Result<(), StoreError>
pub async fn append_with_outbox( &self, _token: WriteToken, workflow_id: &WorkflowId, events: &[Event], expected_seq: u64, outbox_rows: Option<&[OutboxRow]>, ) -> Result<(), StoreError>
Atomically append events and, when outbox_rows is Some, the outbox rows in the same
IMMEDIATE transaction, under the expected-head sequence guard.
This is the durable fan-out write: the scheduling events and their outbox rows commit
together or not at all. Passing None is equivalent to
WritableEventStore::append.
§Errors
Returns StoreError::SequenceConflict when the stored head differs from expected_seq,
StoreError::Serialization when an event or outbox payload cannot be serialized, and
StoreError::Backend for libSQL boundary failures.
Sourcepub async fn outbox_row_state(
&self,
dispatch_key: &str,
) -> Result<Option<OutboxRowState>, StoreError>
pub async fn outbox_row_state( &self, dispatch_key: &str, ) -> Result<Option<OutboxRowState>, StoreError>
Read the persisted lifecycle state of one outbox row by its dispatch key.
Returns the (status, attempt, visible_after) triple, or None when no
row carries dispatch_key (the dedup guard may have ignored it). This is
an out-of-band inspection helper — the OutboxStore dispatch contract
itself keys terminal transitions off dispatch_key and never needs to
read a row back — used by the dispatcher’s tests and by operators auditing
dead-lettered (failed) rows.
§Errors
Returns StoreError::Backend for libSQL boundary failures and
StoreError::Serialization when the stored status token or timestamp
cannot be decoded.
Trait Implementations§
Source§impl Clone for LibSqlStore
impl Clone for LibSqlStore
Source§fn clone(&self) -> LibSqlStore
fn clone(&self) -> LibSqlStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl NamespaceStore for LibSqlStore
impl NamespaceStore for LibSqlStore
Source§fn register_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
origin: NamespaceOrigin,
) -> Pin<Box<dyn Future<Output = Result<MintOutcome, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn register_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
origin: NamespaceOrigin,
) -> Pin<Box<dyn Future<Output = Result<MintOutcome, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn put_namespace<'life0, 'async_trait>(
&'life0 self,
record: NamespaceRecord,
) -> Pin<Box<dyn Future<Output = Result<MintOutcome, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_namespace<'life0, 'async_trait>(
&'life0 self,
record: NamespaceRecord,
) -> Pin<Box<dyn Future<Output = Result<MintOutcome, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
POST /namespaces). Read moreSource§fn list_namespaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NamespaceRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_namespaces<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<NamespaceRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<NamespaceRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<NamespaceRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
name. Read moreSource§fn set_namespace_placement<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
placement: NamespacePlacement,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_namespace_placement<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
placement: NamespacePlacement,
) -> Pin<Box<dyn Future<Output = Result<Option<()>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn deprecate_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn deprecate_namespace<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
NamespaceState::Active to
NamespaceState::Deprecated (deprecate-before-delete). Read moreSource§impl OutboxStore for LibSqlStore
impl OutboxStore for LibSqlStore
Source§fn append_outbox_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
rows: &'life1 [OutboxRow],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn append_outbox_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
rows: &'life1 [OutboxRow],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn claim_outbox_rows<'life0, 'async_trait>(
&'life0 self,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn claim_outbox_rows<'life0, 'async_trait>(
&'life0 self,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn claim_outbox_rows_excluding<'life0, 'life1, 'async_trait>(
&'life0 self,
limit: u32,
held: &'life1 HashSet<WorkflowId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn claim_outbox_rows_excluding<'life0, 'life1, 'async_trait>(
&'life0 self,
limit: u32,
held: &'life1 HashSet<WorkflowId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
limit due pending rows whose owning workflow is
NOT in held (the pause dispatch-hold, #204). Read moreSource§fn claim_outbox_rows_scoped<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ClaimScope,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn claim_outbox_rows_scoped<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 ClaimScope,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn claim_outbox_rows_scoped_excluding<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ClaimScope,
limit: u32,
held: &'life2 HashSet<WorkflowId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_outbox_rows_scoped_excluding<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 ClaimScope,
limit: u32,
held: &'life2 HashSet<WorkflowId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
limit due pending rows that are in scope AND whose
owning workflow is NOT in held (the pause dispatch-hold, #204). Read moreSource§fn rearm_stale_claimed_outbox_rows<'life0, 'async_trait>(
&'life0 self,
older_than: DateTime<Utc>,
visible_after: DateTime<Utc>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rearm_stale_claimed_outbox_rows<'life0, 'async_trait>(
&'life0 self,
older_than: DateTime<Utc>,
visible_after: DateTime<Utc>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_stale_claimed_outbox_rows<'life0, 'async_trait>(
&'life0 self,
older_than: DateTime<Utc>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_stale_claimed_outbox_rows<'life0, 'async_trait>(
&'life0 self,
older_than: DateTime<Utc>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRow>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
limit STALE claimed rows — status is OutboxStatus::Claimed and the
durable claimed_at is older than older_than — WITHOUT transitioning them (#253). Read moreSource§fn list_unsettled_outbox_workflow_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_unsettled_outbox_workflow_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
status is
OutboxStatus::Pending or OutboxStatus::Claimed — scoped to this node’s owned shards
like every other outbox enumeration (#253). Read moreSource§fn cancel_outbox_rows_for_workflow<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel_outbox_rows_for_workflow<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
OutboxStatus::Pending or OutboxStatus::Claimed) row
of workflow_id to OutboxStatus::Cancelled, returning the settled dispatch_keys
(#253). Read moreSource§fn complete_outbox_row<'life0, 'life1, 'async_trait>(
&'life0 self,
dispatch_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete_outbox_row<'life0, 'life1, 'async_trait>(
&'life0 self,
dispatch_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn retry_outbox_row<'life0, 'life1, 'async_trait>(
&'life0 self,
dispatch_key: &'life1 str,
next_attempt: u32,
visible_after: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retry_outbox_row<'life0, 'life1, 'async_trait>(
&'life0 self,
dispatch_key: &'life1 str,
next_attempt: u32,
visible_after: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn fail_outbox_row<'life0, 'life1, 'async_trait>(
&'life0 self,
dispatch_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fail_outbox_row<'life0, 'life1, 'async_trait>(
&'life0 self,
dispatch_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn count_inflight_outbox_rows<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn count_inflight_outbox_rows<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
namespace (CP2-Q1.5). Read moreSource§fn count_claimed_outbox_rows<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn count_claimed_outbox_rows<'life0, 'life1, 'async_trait>(
&'life0 self,
namespace: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
namespace (CP2-Q2). Read moreSource§fn count_claimed_outbox_rows_by_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespaces: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, u64>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn count_claimed_outbox_rows_by_namespace<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
namespaces: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<String, u64>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
namespaces, in ONE pass (CP2-Q2 perf). Read moreSource§fn pending_outbox_routes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ClaimScope>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_outbox_routes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ClaimScope>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
(namespace, task_queue, node) routes that currently have at least
one CLAIMABLE pending row — a row whose status is OutboxStatus::Pending and whose
visible_after fence has passed (CP2-Q2). Read moreSource§impl PackageStore for LibSqlStore
impl PackageStore for LibSqlStore
Source§fn put_package<'life0, 'async_trait>(
&'life0 self,
record: PackageRecord,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_package<'life0, 'async_trait>(
&'life0 self,
record: PackageRecord,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
record and atomically points the type’s route at it. Read moreSource§fn put_package_with_routes<'life0, 'life1, 'async_trait>(
&'life0 self,
record: PackageRecord,
route_workflow_types: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_package_with_routes<'life0, 'life1, 'async_trait>(
&'life0 self,
record: PackageRecord,
route_workflow_types: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
record and atomically points every member workflow type at
its content hash. Read moreSource§fn list_packages<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_packages<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
deployed_at order
(ties broken by (workflow_type, content_hash) text order), so
startup reload re-applies deploys deterministically.Source§fn delete_package<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_type: &'life1 str,
content_hash: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_package<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_type: &'life1 str,
content_hash: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
(workflow_type, content_hash). Read moreSource§fn put_package_route<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_type: &'life1 str,
content_hash: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn put_package_route<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_type: &'life1 str,
content_hash: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn list_package_routes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageRouteRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_package_routes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PackageRouteRecord>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
workflow_type text order.Source§impl ReadableEventStore for LibSqlStore
impl ReadableEventStore for LibSqlStore
Source§fn read_history<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_history<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
workflow_id in ascending sequence order. Read moreSource§fn read_history_from<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
from_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_history_from<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
from_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
workflow_id restricted to events with sequence number
greater than or equal to from_seq, in ascending sequence order. Read moreSource§fn read_run_chain<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunSummary>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_run_chain<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<Vec<RunSummary>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
workflow_id in continuation order.Source§fn list_workflow_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_workflow_ids<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_active<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_active<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_paused<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_paused<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowId>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
WorkflowStatus::Paused. Read moreSource§fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 WorkflowFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowSummary>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 WorkflowFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowSummary>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
filter.Source§fn schedule_timer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
timer_id: &'life2 TimerId,
fire_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn schedule_timer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
timer_id: &'life2 TimerId,
fire_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn expired_timers<'life0, 'async_trait>(
&'life0 self,
as_of: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TimerEntry>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn expired_timers<'life0, 'async_trait>(
&'life0 self,
as_of: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<TimerEntry>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fire_at is less than or equal to as_of.Source§fn set_owned_shards(&self, shards: Option<&[usize]>)
fn set_owned_shards(&self, shards: Option<&[usize]>)
shards is None. Read moreSource§fn acquire_owned_shards(&self, shards: &[usize]) -> Result<(), StoreError>
fn acquire_owned_shards(&self, shards: &[usize]) -> Result<(), StoreError>
Source§fn acquire_owned_shard(&self, shard: usize) -> Result<(), StoreError>
fn acquire_owned_shard(&self, shard: usize) -> Result<(), StoreError>
shard — the
per-shard primitive Self::acquire_owned_shards is a loop over, exposed
so the failover path can drive a per-shard abort seam: a clean election
loss on one shard (StoreError::NotOwner) drops only that shard rather
than failing the whole adoption batch (ADR-021 clean-partial). Read moreSource§fn is_current_owner(&self, shard: usize) -> bool
fn is_current_owner(&self, shard: usize) -> bool
shard — it won
the per-shard election THIS process lifetime and has not been deposed
in-process. Read moreSource§fn extend_owned_shards(&self, shards: &[usize])
fn extend_owned_shards(&self, shards: &[usize])
shards to this node’s owned-enumeration scope, UNIONING them with
the shards it already owns rather than replacing the set. Read moreSource§fn publish_shard_owner(&self, shard: usize) -> Result<(), StoreError>
fn publish_shard_owner(&self, shard: usize) -> Result<(), StoreError>
shard in the cluster’s
shard-owner directory, so other nodes’ request-routing edges resolve
shard to this node (SS-3). Read moreSource§impl VisibilityStore for LibSqlStore
impl VisibilityStore for LibSqlStore
Source§fn record_visibility<'life0, 'async_trait>(
&'life0 self,
record: VisibilityRecord,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_visibility<'life0, 'async_trait>(
&'life0 self,
record: VisibilityRecord,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn list_workflows<'life0, 'async_trait>(
&'life0 self,
filter: ListWorkflowsFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<VisibilityWorkflowSummary>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_workflows<'life0, 'async_trait>(
&'life0 self,
filter: ListWorkflowsFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<VisibilityWorkflowSummary>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
filter. Read moreSource§fn count_workflows<'life0, 'async_trait>(
&'life0 self,
filter: ListWorkflowsFilter,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_workflows<'life0, 'async_trait>(
&'life0 self,
filter: ListWorkflowsFilter,
) -> Pin<Box<dyn Future<Output = Result<u64, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
filter. Read moreSource§impl WritableEventStore for LibSqlStore
impl WritableEventStore for LibSqlStore
Source§fn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: WriteToken,
workflow_id: &'life1 WorkflowId,
events: &'life2 [Event],
expected_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_token: WriteToken,
workflow_id: &'life1 WorkflowId,
events: &'life2 [Event],
expected_seq: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
events to workflow_id when the stored history head equals
expected_seq. Read moreSource§fn append_with_outbox<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_token: WriteToken,
workflow_id: &'life1 WorkflowId,
events: &'life2 [Event],
expected_seq: u64,
outbox_rows: &'life3 [OutboxRow],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn append_with_outbox<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_token: WriteToken,
workflow_id: &'life1 WorkflowId,
events: &'life2 [Event],
expected_seq: u64,
outbox_rows: &'life3 [OutboxRow],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
events and the durable-outbox outbox_rows for workflow_id in a
single transaction, under the same expected-head sequence guard as Self::append. Read moreSource§fn rearm_outbox_pending<'life0, 'life1, 'async_trait>(
&'life0 self,
rows: &'life1 [OutboxRow],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rearm_outbox_pending<'life0, 'life1, 'async_trait>(
&'life0 self,
rows: &'life1 [OutboxRow],
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
rows’ dispatch_keys to Pending, re-staging them for the
out-of-band dispatcher. Read moreSource§fn settle_outbox_row_cancelled<'life0, 'life1, 'async_trait>(
&'life0 self,
dispatch_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn settle_outbox_row_cancelled<'life0, 'life1, 'async_trait>(
&'life0 self,
dispatch_key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn settle_workflow_outbox_rows_cancelled<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn settle_workflow_outbox_rows_cancelled<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 WorkflowId,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
crate::OutboxStatus::Pending or
crate::OutboxStatus::Claimed) outbox row of workflow_id to
crate::OutboxStatus::Cancelled, returning the settled dispatch_keys (#253). Read moreAuto Trait Implementations§
impl !RefUnwindSafe for LibSqlStore
impl !UnwindSafe for LibSqlStore
impl Freeze for LibSqlStore
impl Send for LibSqlStore
impl Sync for LibSqlStore
impl Unpin for LibSqlStore
impl UnsafeUnpin for LibSqlStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> EventStore for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request