pub struct LiveEngine { /* private fields */ }Expand description
A running Mocker scheduler with request-scoped output streams.
Implementations§
Source§impl LiveEngine
impl LiveEngine
Sourcepub fn start(args: MockEngineArgs, dp_rank: u32) -> Result<Self>
pub fn start(args: MockEngineArgs, dp_rank: u32) -> Result<Self>
Start one live scheduler at dp_rank.
Sourcepub async fn submit(&self, request: DirectRequest) -> Result<LiveRequest>
pub async fn submit(&self, request: DirectRequest) -> Result<LiveRequest>
Submit a request and return its scoped output receiver.
Sourcepub async fn cancel(&self, request_id: Uuid) -> Result<bool>
pub async fn cancel(&self, request_id: Uuid) -> Result<bool>
Cancel an active request and wait until the scheduler applies it.
Sourcepub fn metrics_receiver(&self) -> Receiver<MockerMetrics>
pub fn metrics_receiver(&self) -> Receiver<MockerMetrics>
Subscribe to live scheduler occupancy and KV metrics.
Sourcepub fn active_request_count(&self) -> usize
pub fn active_request_count(&self) -> usize
Number of response streams currently registered with the dispatcher.
Trait Implementations§
Source§impl Clone for LiveEngine
impl Clone for LiveEngine
Source§fn clone(&self) -> LiveEngine
fn clone(&self) -> LiveEngine
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 !RefUnwindSafe for LiveEngine
impl !UnwindSafe for LiveEngine
impl Freeze for LiveEngine
impl Send for LiveEngine
impl Sync for LiveEngine
impl Unpin for LiveEngine
impl UnsafeUnpin for LiveEngine
Blanket Implementations§
impl<T> BlockMetadata for T
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