pub trait TrafficSplitter: Send + Sync {
// Required methods
fn route_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request_id: &'life1 str,
canary_percent: f64,
) -> Pin<Box<dyn Future<Output = ActuatorResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_routing_stats(&self) -> HashMap<String, u64>;
}Expand description
Trait for traffic splitting
Required Methods§
Sourcefn route_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request_id: &'life1 str,
canary_percent: f64,
) -> Pin<Box<dyn Future<Output = ActuatorResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn route_request<'life0, 'life1, 'async_trait>(
&'life0 self,
request_id: &'life1 str,
canary_percent: f64,
) -> Pin<Box<dyn Future<Output = ActuatorResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Route request to canary or control
Sourcefn get_routing_stats(&self) -> HashMap<String, u64>
fn get_routing_stats(&self) -> HashMap<String, u64>
Get current routing statistics