-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(routing): add invalidate window as a service for SR based routing (
#6264) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
0302c30
commit 607b3df
Showing
6 changed files
with
170 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,68 @@ | ||
syntax = "proto3"; | ||
package success_rate; | ||
|
||
service SuccessRateCalculator { | ||
rpc FetchSuccessRate (CalSuccessRateRequest) returns (CalSuccessRateResponse); | ||
|
||
rpc UpdateSuccessRateWindow (UpdateSuccessRateWindowRequest) returns (UpdateSuccessRateWindowResponse); | ||
} | ||
|
||
// API-1 types | ||
message CalSuccessRateRequest { | ||
string id = 1; | ||
string params = 2; | ||
repeated string labels = 3; | ||
CalSuccessRateConfig config = 4; | ||
} | ||
|
||
message CalSuccessRateConfig { | ||
uint32 min_aggregates_size = 1; | ||
double default_success_rate = 2; | ||
} | ||
|
||
message CalSuccessRateResponse { | ||
repeated LabelWithScore labels_with_score = 1; | ||
} | ||
|
||
message LabelWithScore { | ||
double score = 1; | ||
string label = 2; | ||
} | ||
service SuccessRateCalculator { | ||
rpc FetchSuccessRate (CalSuccessRateRequest) returns (CalSuccessRateResponse); | ||
|
||
rpc UpdateSuccessRateWindow (UpdateSuccessRateWindowRequest) returns (UpdateSuccessRateWindowResponse); | ||
|
||
rpc InvalidateWindows (InvalidateWindowsRequest) returns (InvalidateWindowsResponse); | ||
} | ||
|
||
// API-1 types | ||
message CalSuccessRateRequest { | ||
string id = 1; | ||
string params = 2; | ||
repeated string labels = 3; | ||
CalSuccessRateConfig config = 4; | ||
} | ||
|
||
message CalSuccessRateConfig { | ||
uint32 min_aggregates_size = 1; | ||
double default_success_rate = 2; | ||
} | ||
|
||
message CalSuccessRateResponse { | ||
repeated LabelWithScore labels_with_score = 1; | ||
} | ||
|
||
message LabelWithScore { | ||
double score = 1; | ||
string label = 2; | ||
} | ||
|
||
// API-2 types | ||
message UpdateSuccessRateWindowRequest { | ||
string id = 1; | ||
string params = 2; | ||
repeated LabelWithStatus labels_with_status = 3; | ||
UpdateSuccessRateWindowConfig config = 4; | ||
} | ||
|
||
message LabelWithStatus { | ||
string label = 1; | ||
bool status = 2; | ||
} | ||
|
||
message UpdateSuccessRateWindowConfig { | ||
uint32 max_aggregates_size = 1; | ||
CurrentBlockThreshold current_block_threshold = 2; | ||
} | ||
|
||
message CurrentBlockThreshold { | ||
optional uint64 duration_in_mins = 1; | ||
uint64 max_total_count = 2; | ||
} | ||
|
||
message UpdateSuccessRateWindowResponse { | ||
string message = 1; | ||
} | ||
message UpdateSuccessRateWindowRequest { | ||
string id = 1; | ||
string params = 2; | ||
repeated LabelWithStatus labels_with_status = 3; | ||
UpdateSuccessRateWindowConfig config = 4; | ||
} | ||
|
||
message LabelWithStatus { | ||
string label = 1; | ||
bool status = 2; | ||
} | ||
|
||
message UpdateSuccessRateWindowConfig { | ||
uint32 max_aggregates_size = 1; | ||
CurrentBlockThreshold current_block_threshold = 2; | ||
} | ||
|
||
message CurrentBlockThreshold { | ||
optional uint64 duration_in_mins = 1; | ||
uint64 max_total_count = 2; | ||
} | ||
|
||
message UpdateSuccessRateWindowResponse { | ||
string message = 1; | ||
} | ||
|
||
// API-3 types | ||
message InvalidateWindowsRequest { | ||
string id = 1; | ||
} | ||
|
||
message InvalidateWindowsResponse { | ||
string message = 1; | ||
} |