mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-31 01:57:45 +08:00
feat(dynamic_routing): add open router integration for elimination routing (#7896)
This commit is contained in:
@ -642,6 +642,17 @@ impl DynamicRoutingAlgorithmRef {
|
||||
pub fn update_volume_split(&mut self, volume: Option<u8>) {
|
||||
self.dynamic_routing_volume_split = volume
|
||||
}
|
||||
|
||||
pub fn is_elimination_enabled(&self) -> bool {
|
||||
self.elimination_routing_algorithm
|
||||
.as_ref()
|
||||
.map(|elimination_routing| {
|
||||
elimination_routing.enabled_feature
|
||||
== DynamicRoutingFeatures::DynamicConnectorSelection
|
||||
|| elimination_routing.enabled_feature == DynamicRoutingFeatures::Metrics
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Copy, serde::Serialize, serde::Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user