pub struct MemoryWorkQueue { /* private fields */ }Expand description
In-memory WorkQueue for consumer unit tests: hands out queued items in
order and records every committed command. No leases, no durability.
Implementations§
Source§impl MemoryWorkQueue
impl MemoryWorkQueue
Sourcepub fn committed(&self) -> Vec<(WorkItem, WorkflowTransitionCommand)>
pub fn committed(&self) -> Vec<(WorkItem, WorkflowTransitionCommand)>
Every (item, command) pair committed so far, in commit order.
Trait Implementations§
Source§impl Default for MemoryWorkQueue
impl Default for MemoryWorkQueue
Source§fn default() -> MemoryWorkQueue
fn default() -> MemoryWorkQueue
Returns the “default value” for a type. Read more
Source§impl WorkQueue for MemoryWorkQueue
impl WorkQueue for MemoryWorkQueue
Source§fn admit_evaluation<'life0, 'life1, 'async_trait>(
&'life0 self,
_: &'life1 WorkItem,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn admit_evaluation<'life0, 'life1, 'async_trait>(
&'life0 self,
_: &'life1 WorkItem,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Recheck current owner admission before any graph/read or custom-driver evaluation.
Queues without an authority source fail closed. Terminal system observations
and cancellation still enter their existing convergence paths.
Source§fn claim_due<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec_ids: &'life1 [String],
_worker_id: &'life2 str,
_lease_secs: i64,
batch: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkItem>, SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_due<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
spec_ids: &'life1 [String],
_worker_id: &'life2 str,
_lease_secs: i64,
batch: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkItem>, SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Claim due instances for
spec_ids; an empty slice selects all specs.Source§fn renew<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_tenant_id: &'life1 str,
id: &'life2 str,
_worker_id: &'life3 str,
lease_version: i64,
_lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn renew<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_tenant_id: &'life1 str,
id: &'life2 str,
_worker_id: &'life3 str,
lease_version: i64,
_lease_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Renew a claim’s lease.
Source§fn commit_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 WorkItem,
command: &'life2 WorkflowTransitionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn commit_command<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
item: &'life1 WorkItem,
command: &'life2 WorkflowTransitionCommand,
) -> Pin<Box<dyn Future<Output = Result<(), SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Commit a driver command atomically.
Source§fn load_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 WorkItem,
) -> Pin<Box<dyn Future<Output = Result<WorkflowRevision, SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
_item: &'life1 WorkItem,
) -> Pin<Box<dyn Future<Output = Result<WorkflowRevision, SupervisorError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read the immutable revision of an owned, currently leased instance.
Stores without revision persistence reject dynamic spec execution.
Auto Trait Implementations§
impl !Freeze for MemoryWorkQueue
impl RefUnwindSafe for MemoryWorkQueue
impl Send for MemoryWorkQueue
impl Sync for MemoryWorkQueue
impl Unpin for MemoryWorkQueue
impl UnsafeUnpin for MemoryWorkQueue
impl UnwindSafe for MemoryWorkQueue
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