Skip to content

Commit

Permalink
Address protobuf linter warnings. (#134)
Browse files Browse the repository at this point in the history
1. Default value should not be a value that is in use.
2. Make enum nested so enum values are not global.
  • Loading branch information
eugeneo authored Aug 28, 2023
1 parent 43ef3eb commit 374b488
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions grpc/testing/messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,17 @@ message LoadBalancerStatsRequest {

message LoadBalancerStatsResponse {
enum MetadataType {
Initial = 0;
Trailing = 1;
UNKNOWN = 0;
INITIAL = 1;
TRAILING = 2;
}
message MetadataEntry {
// Key, exactly as received from the server. Case may be different from what
// was requested in the LoadBalancerStatsRequest)
string key = 1;
// Value, exactly as received from the server.
string value = 2;
// Metadata type is either Initial or Trailing
// Metadata type
MetadataType type = 3;
}
message RpcMetadata {
Expand Down Expand Up @@ -318,16 +319,17 @@ message TestOrcaReport {
map<string, double> utilization = 4;
}

enum HookRequestCommand {
// Start the HTTP endpoint
START = 0;
// Stop
STOP = 1;
// Return from HTTP GET/POST
RETURN = 2;
}

message HookRequest {
enum HookRequestCommand {
// Default value
UNSPECIFIED = 0;
// Start the HTTP endpoint
START = 1;
// Stop
STOP = 2;
// Return from HTTP GET/POST
RETURN = 3;
}
HookRequestCommand command = 1;
int32 grpc_code_to_return = 2;
string grpc_status_description = 3;
Expand Down

0 comments on commit 374b488

Please sign in to comment.