pub struct LiveEngine { /* private fields */ }Expand description
A running Mocker scheduler with request-scoped output streams.
Implementations§
Source§impl LiveEngine
impl LiveEngine
Sourcepub fn register_handoff(
&self,
handoff_id: HandoffId,
) -> Result<(LiveHandoffControl, LiveHandoffEvents)>
pub fn register_handoff( &self, handoff_id: HandoffId, ) -> Result<(LiveHandoffControl, LiveHandoffEvents)>
Register one disaggregated handoff and its normalized lifecycle stream.
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 fn start_with_config(
args: MockEngineArgs,
dp_rank: u32,
config: LiveEngineConfig,
) -> Result<Self>
pub fn start_with_config( args: MockEngineArgs, dp_rank: u32, config: LiveEngineConfig, ) -> Result<Self>
Start one live scheduler with runtime-owned KV and FPM publishers.
Sourcepub fn start_with_config_and_request_output_buffering(
args: MockEngineArgs,
dp_rank: u32,
config: LiveEngineConfig,
request_output_buffering: RequestOutputBuffering,
) -> Result<Self>
pub fn start_with_config_and_request_output_buffering( args: MockEngineArgs, dp_rank: u32, config: LiveEngineConfig, request_output_buffering: RequestOutputBuffering, ) -> Result<Self>
Start one live scheduler with runtime-owned publishers and an explicit per-request output buffering policy.
Sourcepub fn start_grouped_with_configs(
args: MockEngineArgs,
configs: Vec<LiveEngineConfig>,
) -> Result<Vec<Self>>
pub fn start_grouped_with_configs( args: MockEngineArgs, configs: Vec<LiveEngineConfig>, ) -> Result<Vec<Self>>
Start all attention-DP ranks as one logical grouped engine.
Each returned LiveEngine retains the latest-main rank-scoped request
and handoff API, while all ranks share one scheduler actor and one
aisimulate_core::engine::generalized::GeneralizedMockerEngine barrier.
Sourcepub fn start_grouped_with_configs_and_request_output_buffering(
args: MockEngineArgs,
configs: Vec<LiveEngineConfig>,
request_output_buffering: RequestOutputBuffering,
) -> Result<Vec<Self>>
pub fn start_grouped_with_configs_and_request_output_buffering( args: MockEngineArgs, configs: Vec<LiveEngineConfig>, request_output_buffering: RequestOutputBuffering, ) -> Result<Vec<Self>>
Start all attention-DP ranks with an explicit per-request output buffering policy.
Sourcepub fn prepare_request(
&self,
request: DirectRequest,
) -> Result<(LiveRequestRegistration, LiveRequest)>
pub fn prepare_request( &self, request: DirectRequest, ) -> Result<(LiveRequestRegistration, LiveRequest)>
Register a request route without submitting it to the scheduler.
Disaggregated handoff commands consume the returned registration after their bootstrap session is ready. Dropping an unused registration removes the route and closes the paired response stream.
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.
pub async fn shutdown(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for LiveEngine
impl Clone for LiveEngine
Source§fn clone(&self) -> LiveEngine
fn clone(&self) -> LiveEngine
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more