pub trait DispatchRouter:
Debug
+ Send
+ Sync {
// Required method
fn select_worker(
&self,
workflow_id: &str,
channel_name: &ChannelName,
request: &ActivityRequest,
candidates: &[DispatchWorker],
excluded_worker_ids: &[String],
) -> Result<Option<DispatchWorker>, AionSurfaceError>;
}Expand description
Selects a worker by invoking the channel’s configured routing function.
Required Methods§
Sourcefn select_worker(
&self,
workflow_id: &str,
channel_name: &ChannelName,
request: &ActivityRequest,
candidates: &[DispatchWorker],
excluded_worker_ids: &[String],
) -> Result<Option<DispatchWorker>, AionSurfaceError>
fn select_worker( &self, workflow_id: &str, channel_name: &ChannelName, request: &ActivityRequest, candidates: &[DispatchWorker], excluded_worker_ids: &[String], ) -> Result<Option<DispatchWorker>, AionSurfaceError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".