pub struct SqliteAgentPoolStore { /* private fields */ }Expand description
SQLite-backed implementation of AgentPoolStore.
Two independent SqliteAgentPoolStore values opened against the same
database file share pool membership, messages, wake registrations, dedupe,
rehydration, and watch cursors. The adapter stores core pool records as JSON
and replays them into snapshots; it does not own workflow scheduling or a
second event bus.
Implementations§
Trait Implementations§
Source§impl AgentPoolStore for SqliteAgentPoolStore
impl AgentPoolStore for SqliteAgentPoolStore
Source§fn open_pool(
&self,
pool_id: AgentPoolId,
config: AgentPoolStoreConfig,
) -> Result<AgentPoolSnapshot, AgentError>
fn open_pool( &self, pool_id: AgentPoolId, config: AgentPoolStoreConfig, ) -> Result<AgentPoolSnapshot, AgentError>
Create or open a logical pool and return the durable snapshot.
Source§fn snapshot(
&self,
pool_id: &AgentPoolId,
) -> Result<AgentPoolSnapshot, AgentError>
fn snapshot( &self, pool_id: &AgentPoolId, ) -> Result<AgentPoolSnapshot, AgentError>
Rehydrate the current durable pool snapshot.
Source§fn record_pool_created(
&self,
pool_id: &AgentPoolId,
) -> Result<AgentPoolStoreCursor, AgentError>
fn record_pool_created( &self, pool_id: &AgentPoolId, ) -> Result<AgentPoolStoreCursor, AgentError>
Mark the pool-created lifecycle as durable.
Source§fn join_member(
&self,
pool_id: &AgentPoolId,
member: AgentPoolMember,
) -> Result<AgentPoolStoreCursor, AgentError>
fn join_member( &self, pool_id: &AgentPoolId, member: AgentPoolMember, ) -> Result<AgentPoolStoreCursor, AgentError>
Persist member join.
Source§fn leave_member(
&self,
pool_id: &AgentPoolId,
run_id: &RunId,
) -> Result<(AgentPoolMember, AgentPoolStoreCursor), AgentError>
fn leave_member( &self, pool_id: &AgentPoolId, run_id: &RunId, ) -> Result<(AgentPoolMember, AgentPoolStoreCursor), AgentError>
Persist member leave and return the removed member.
Source§fn message_receipt(
&self,
pool_id: &AgentPoolId,
idempotency_key: &IdempotencyKey,
) -> Result<Option<MessageReceipt>, AgentError>
fn message_receipt( &self, pool_id: &AgentPoolId, idempotency_key: &IdempotencyKey, ) -> Result<Option<MessageReceipt>, AgentError>
Look up message dedupe state by idempotency key.
Source§fn record_message(
&self,
pool_id: &AgentPoolId,
message: RunMessage,
receipt: MessageReceipt,
) -> Result<AgentPoolStoreCursor, AgentError>
fn record_message( &self, pool_id: &AgentPoolId, message: RunMessage, receipt: MessageReceipt, ) -> Result<AgentPoolStoreCursor, AgentError>
Persist one message status transition.
Source§fn wake_registration(
&self,
pool_id: &AgentPoolId,
idempotency_key: &IdempotencyKey,
) -> Result<Option<WakeRegistration>, AgentError>
fn wake_registration( &self, pool_id: &AgentPoolId, idempotency_key: &IdempotencyKey, ) -> Result<Option<WakeRegistration>, AgentError>
Look up wake dedupe state by idempotency key.
Source§fn wake(
&self,
pool_id: &AgentPoolId,
condition_id: &WakeConditionId,
) -> Result<Option<AgentPoolStoredWake>, AgentError>
fn wake( &self, pool_id: &AgentPoolId, condition_id: &WakeConditionId, ) -> Result<Option<AgentPoolStoredWake>, AgentError>
Look up one stored wake by condition id.
Source§fn record_wake(
&self,
pool_id: &AgentPoolId,
condition: WakeCondition,
compiled_filter: CompiledEventFilter,
registration: WakeRegistration,
) -> Result<AgentPoolStoreCursor, AgentError>
fn record_wake( &self, pool_id: &AgentPoolId, condition: WakeCondition, compiled_filter: CompiledEventFilter, registration: WakeRegistration, ) -> Result<AgentPoolStoreCursor, AgentError>
Persist one wake status transition.
Source§fn watch(
&self,
pool_id: &AgentPoolId,
cursor: Option<AgentPoolStoreCursor>,
) -> Result<AgentPoolStoreStream, AgentError>
fn watch( &self, pool_id: &AgentPoolId, cursor: Option<AgentPoolStoreCursor>, ) -> Result<AgentPoolStoreStream, AgentError>
Read durable pool changes after the supplied cursor.
Source§fn next_event_sequence(&self, pool_id: &AgentPoolId) -> Result<u64, AgentError>
fn next_event_sequence(&self, pool_id: &AgentPoolId) -> Result<u64, AgentError>
Allocate a unique event sequence for pool event IDs.
Source§impl Clone for SqliteAgentPoolStore
impl Clone for SqliteAgentPoolStore
Source§fn clone(&self) -> SqliteAgentPoolStore
fn clone(&self) -> SqliteAgentPoolStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SqliteAgentPoolStore
impl RefUnwindSafe for SqliteAgentPoolStore
impl Send for SqliteAgentPoolStore
impl Sync for SqliteAgentPoolStore
impl Unpin for SqliteAgentPoolStore
impl UnsafeUnpin for SqliteAgentPoolStore
impl UnwindSafe for SqliteAgentPoolStore
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
Mutably borrows from an owned value. Read more