feat: runner protocol
This commit is contained in:
parent
603a74b1c3
commit
2c415482ca
2 changed files with 42 additions and 14 deletions
|
@ -1,14 +0,0 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package gettest.v1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
service GetTestService {
|
||||
rpc GetTest (google.protobuf.Empty) returns (GetTestResponse);
|
||||
}
|
||||
|
||||
message GetTestResponse {
|
||||
int32 id = 1;
|
||||
}
|
42
runner/v1/runner.proto
Normal file
42
runner/v1/runner.proto
Normal file
|
@ -0,0 +1,42 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package runner.v1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
service RunnerService {
|
||||
rpc GetWork (google.protobuf.Empty) returns (stream GetWorkResponse);
|
||||
rpc BuildFinished (stream BuildFinishedRequest) returns (google.protobuf.Empty);
|
||||
rpc TestFinished (stream TestFinishedRequest) returns (google.protobuf.Empty);
|
||||
}
|
||||
|
||||
message Test {
|
||||
uint32 test_id = 1;
|
||||
uint32 language_id = 2;
|
||||
bytes solution_executable = 3;
|
||||
}
|
||||
|
||||
message Build {
|
||||
uint32 solution_id = 1;
|
||||
uint32 language_id = 2;
|
||||
bytes solution_code = 3;
|
||||
}
|
||||
|
||||
message GetWorkResponse {
|
||||
oneof work {
|
||||
Test test = 1;
|
||||
Build build = 2;
|
||||
bool no work = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message TestFinishedRequest {
|
||||
uint32 test = 1;
|
||||
uint32 result = 2;
|
||||
}
|
||||
|
||||
message BuildFinishedRequest {
|
||||
uint32 solution_id = 1;
|
||||
bytes solution_executable = 2;
|
||||
}
|
Loading…
Reference in a new issue