pub struct QueueManager { /* private fields */ }Expand description
Queue manager
Implementations§
Source§impl QueueManager
impl QueueManager
Sourcepub async fn submit(
&self,
lane_id: &str,
command: Box<dyn Command>,
) -> Result<Receiver<Result<Value>>>
pub async fn submit( &self, lane_id: &str, command: Box<dyn Command>, ) -> Result<Receiver<Result<Value>>>
Submit a command to a lane
Sourcepub async fn stats(&self) -> Result<QueueStats>
pub async fn stats(&self) -> Result<QueueStats>
Get queue statistics
Sourcepub fn queue(&self) -> Arc<CommandQueue>
pub fn queue(&self) -> Arc<CommandQueue>
Get the underlying command queue
Sourcepub fn subscribe(&self) -> EventStream
pub fn subscribe(&self) -> EventStream
Subscribe to all queue lifecycle events as an EventStream (implements Stream)
Sourcepub fn subscribe_filtered(
&self,
filter: impl Fn(&LaneEvent) -> bool + Send + Sync + 'static,
) -> EventStream
pub fn subscribe_filtered( &self, filter: impl Fn(&LaneEvent) -> bool + Send + Sync + 'static, ) -> EventStream
Subscribe to filtered queue lifecycle events as an EventStream
Sourcepub async fn drain(&self, timeout: Duration) -> Result<()>
pub async fn drain(&self, timeout: Duration) -> Result<()>
Wait for all pending commands to complete (with timeout)
Sourcepub fn is_shutting_down(&self) -> bool
pub fn is_shutting_down(&self) -> bool
Check if shutdown is in progress
Sourcepub fn metrics(&self) -> Option<&QueueMetrics>
pub fn metrics(&self) -> Option<&QueueMetrics>
Get the metrics collector (if configured)
Sourcepub fn alerts(&self) -> Option<&Arc<AlertManager>>
pub fn alerts(&self) -> Option<&Arc<AlertManager>>
Get the alert manager (if configured)
Auto Trait Implementations§
impl !Freeze for QueueManager
impl !RefUnwindSafe for QueueManager
impl Send for QueueManager
impl Sync for QueueManager
impl Unpin for QueueManager
impl UnsafeUnpin for QueueManager
impl !UnwindSafe for QueueManager
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