Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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