| /* |
| Copyright [2020] [Apache Software Foundation] |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| */ |
| 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) {} |
| } |