pub struct InMemoryAgentPoolStore { /* private fields */ }Expand description
In-memory AgentPoolStore implementation.
Cloning this value shares the same backing map, making it useful for
tests that simulate two process-local AgentPool handles sharing one
coordination authority. Separate default values are isolated.
Trait Implementations§
Source§impl AgentPoolStore for InMemoryAgentPoolStore
impl AgentPoolStore for InMemoryAgentPoolStore
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 InMemoryAgentPoolStore
impl Clone for InMemoryAgentPoolStore
Source§fn clone(&self) -> InMemoryAgentPoolStore
fn clone(&self) -> InMemoryAgentPoolStore
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 moreSource§impl Debug for InMemoryAgentPoolStore
impl Debug for InMemoryAgentPoolStore
Source§impl Default for InMemoryAgentPoolStore
impl Default for InMemoryAgentPoolStore
Source§fn default() -> InMemoryAgentPoolStore
fn default() -> InMemoryAgentPoolStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryAgentPoolStore
impl RefUnwindSafe for InMemoryAgentPoolStore
impl Send for InMemoryAgentPoolStore
impl Sync for InMemoryAgentPoolStore
impl Unpin for InMemoryAgentPoolStore
impl UnsafeUnpin for InMemoryAgentPoolStore
impl UnwindSafe for InMemoryAgentPoolStore
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