Skip to content

Instantly share code, notes, and snippets.

@cardosolucas
Created May 8, 2020 02:08
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 cardosolucas/49b8afa0767dd98b39f25365a0371bb4 to your computer and use it in GitHub Desktop.
Save cardosolucas/49b8afa0767dd98b39f25365a0371bb4 to your computer and use it in GitHub Desktop.
syntax = "proto3";
message Command {
enum CommandType {
DRYRUN = 0;
TEST = 1;
TDD = 2;
TOX = 3;
NOTEBOOK = 4;
LAB = 5;
GRPC = 6;
HTTP = 7;
}
CommandType command = 1;
map<string, string> parameters = 2;
}
//grpc doesn't allow rpc calls without pass a message
message Interruption {}
message Request {}
message Status {
enum StatusType{
OK = 0;
NOK = 1;
}
StatusType status = 1;
}
message State {
string engine_name = 1;
string command = 2;
}
service CommandCall {
rpc callCommand(Command) returns (Status) {}
rpc stopCommand(Interruption) returns (Status) {}
rpc getState(Request) returns (State) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment