pub struct RuntimeBuildTaskRouter { /* private fields */ }Expand description
Routes pinned Flow tasks to dispatchers serving exact runtime builds.
A route can point at an A3S Boot manager, a compatibility queue, or another host dispatcher. Register the same dispatcher under every build it can execute. Unpinned histories require a separate explicit route.
Implementations§
Source§impl RuntimeBuildTaskRouter
impl RuntimeBuildTaskRouter
Sourcepub fn with_route(
self,
runtime_build_id: RuntimeBuildId,
dispatcher: Arc<dyn FlowTaskDispatcher>,
) -> Result<Self>
pub fn with_route( self, runtime_build_id: RuntimeBuildId, dispatcher: Arc<dyn FlowTaskDispatcher>, ) -> Result<Self>
Register the only dispatcher used for an exact runtime build.
Sourcepub fn with_unpinned_route(
self,
dispatcher: Arc<dyn FlowTaskDispatcher>,
) -> Result<Self>
pub fn with_unpinned_route( self, dispatcher: Arc<dyn FlowTaskDispatcher>, ) -> Result<Self>
Register the explicit dispatcher for legacy unpinned histories.
Sourcepub fn runtime_build_ids(&self) -> impl Iterator<Item = &RuntimeBuildId>
pub fn runtime_build_ids(&self) -> impl Iterator<Item = &RuntimeBuildId>
Iterate over the exact pinned build routes.
Sourcepub fn has_unpinned_route(&self) -> bool
pub fn has_unpinned_route(&self) -> bool
Return whether a legacy unpinned route is registered.
Sourcepub async fn dispatch_for_run(
&self,
engine: &FlowEngine,
run_id: &str,
task: FlowTask,
) -> Result<()>
pub async fn dispatch_for_run( &self, engine: &FlowEngine, run_id: &str, task: FlowTask, ) -> Result<()>
Resolve the persisted build for run_id, verify the task target, and
dispatch it through the matching route.
Trait Implementations§
Source§impl Clone for RuntimeBuildTaskRouter
impl Clone for RuntimeBuildTaskRouter
Source§fn clone(&self) -> RuntimeBuildTaskRouter
fn clone(&self) -> RuntimeBuildTaskRouter
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 moreSource§impl Debug for RuntimeBuildTaskRouter
impl Debug for RuntimeBuildTaskRouter
Source§impl Default for RuntimeBuildTaskRouter
impl Default for RuntimeBuildTaskRouter
Source§fn default() -> RuntimeBuildTaskRouter
fn default() -> RuntimeBuildTaskRouter
Returns the “default value” for a type. Read more
Source§impl FlowTaskDispatcher for RuntimeBuildTaskRouter
impl FlowTaskDispatcher for RuntimeBuildTaskRouter
fn dispatch<'life0, 'async_trait>(
&'life0 self,
task: FlowTask,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn has_runtime_build_route(
&self,
required_build_id: Option<&RuntimeBuildId>,
) -> bool
fn has_runtime_build_route( &self, required_build_id: Option<&RuntimeBuildId>, ) -> bool
Return whether this dispatcher has an explicit compatible route.
Source§fn dispatch_for_runtime_build<'life0, 'life1, 'async_trait>(
&'life0 self,
required_build_id: Option<&'life1 RuntimeBuildId>,
task: FlowTask,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dispatch_for_runtime_build<'life0, 'life1, 'async_trait>(
&'life0 self,
required_build_id: Option<&'life1 RuntimeBuildId>,
task: FlowTask,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dispatch to a route that explicitly serves
required_build_id. Read moreSource§fn ensure_runtime_build_route(
&self,
required_build_id: Option<&RuntimeBuildId>,
) -> Result<()>
fn ensure_runtime_build_route( &self, required_build_id: Option<&RuntimeBuildId>, ) -> Result<()>
Fail before dispatch when no compatible route is registered.
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeBuildTaskRouter
impl !UnwindSafe for RuntimeBuildTaskRouter
impl Freeze for RuntimeBuildTaskRouter
impl Send for RuntimeBuildTaskRouter
impl Sync for RuntimeBuildTaskRouter
impl Unpin for RuntimeBuildTaskRouter
impl UnsafeUnpin for RuntimeBuildTaskRouter
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