mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(routing): build the gRPC interface for communicating with the external service to perform elimination routing (#6672)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Chethan Rao <70657455+Chethan-rao@users.noreply.github.com>
This commit is contained in:
@ -745,8 +745,8 @@ pub struct EliminationRoutingConfig {
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, ToSchema)]
|
||||
pub struct EliminationAnalyserConfig {
|
||||
pub bucket_size: Option<u32>,
|
||||
pub bucket_ttl_in_mins: Option<f64>,
|
||||
pub bucket_size: Option<u64>,
|
||||
pub bucket_leak_interval_in_secs: Option<u64>,
|
||||
}
|
||||
|
||||
impl Default for EliminationRoutingConfig {
|
||||
@ -755,7 +755,7 @@ impl Default for EliminationRoutingConfig {
|
||||
params: Some(vec![DynamicRoutingConfigParams::PaymentMethod]),
|
||||
elimination_analyser_config: Some(EliminationAnalyserConfig {
|
||||
bucket_size: Some(5),
|
||||
bucket_ttl_in_mins: Some(2.0),
|
||||
bucket_leak_interval_in_secs: Some(2),
|
||||
}),
|
||||
}
|
||||
}
|
||||
@ -859,3 +859,18 @@ impl CurrentBlockThreshold {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
|
||||
pub struct RoutableConnectorChoiceWithBucketName {
|
||||
pub routable_connector_choice: RoutableConnectorChoice,
|
||||
pub bucket_name: String,
|
||||
}
|
||||
|
||||
impl RoutableConnectorChoiceWithBucketName {
|
||||
pub fn new(routable_connector_choice: RoutableConnectorChoice, bucket_name: String) -> Self {
|
||||
Self {
|
||||
routable_connector_choice,
|
||||
bucket_name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user