Skip to content

Instantly share code, notes, and snippets.

@grant
Created May 4, 2021 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grant/4494158d81fca96151b5a7ccb882f33d to your computer and use it in GitHub Desktop.
Save grant/4494158d81fca96151b5a7ccb882f33d to your computer and use it in GitHub Desktop.
calculator.proto
enum Operation {
ADD = 0;
SUBTRACT = 1;
}
message BinaryOperation {
float first_operand = 1;
float second_operand = 2;
Operation operation = 3;
};
message CalculationResult {
float result = 1;
};
service Calculator {
rpc Calculate (BinaryOperation) returns (CalculationResult);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment