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 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.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.
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