Skip to content

Commit

Permalink
update success_rate proto file
Browse files Browse the repository at this point in the history
  • Loading branch information
Chethan-rao committed Dec 30, 2024
1 parent 337087f commit 4280b7a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions crates/external_services/src/grpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ impl<T> AddHeaders for tonic::Request<T> {
}
}

#[cfg(feature = "dynamic_routing")]
pub(crate) fn create_grpc_request<T: Debug>(message: T, headers: GrpcHeaders) -> tonic::Request<T> {
let mut request = tonic::Request::new(message);
request.add_headers_to_grpc_request(headers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ pub use success_rate::{
missing_docs,
unused_qualifications,
clippy::unwrap_used,
clippy::as_conversions
clippy::as_conversions,
clippy::use_self
)]
pub mod success_rate {
tonic::include_proto!("success_rate");
Expand Down
12 changes: 10 additions & 2 deletions proto/success_rate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ message CurrentBlockThreshold {
}

message UpdateSuccessRateWindowResponse {
string message = 1;
enum UpdationStatus {
WINDOW_UPDATION_SUCCEEDED = 0;
WINDOW_UPDATION_FAILED = 1;
}
UpdationStatus status = 1;
}

// API-3 types
Expand All @@ -64,5 +68,9 @@ message InvalidateWindowsRequest {
}

message InvalidateWindowsResponse {
string message = 1;
enum InvalidationStatus {
WINDOW_INVALIDATION_SUCCEEDED = 0;
WINDOW_INVALIDATION_FAILED = 1;
}
InvalidationStatus status = 1;
}

0 comments on commit 4280b7a

Please sign in to comment.