feat:
This commit is contained in:
parent
c6824ea56a
commit
c71d43077e
2 changed files with 45 additions and 25 deletions
|
@ -1,42 +1,44 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package runner.v1;
|
package runner.v1;
|
||||||
|
option go_package = "/runner/v1;runnerv1";
|
||||||
|
|
||||||
import "google/protobuf/timestamp.proto";
|
import "google/protobuf/duration.proto";
|
||||||
import "google/protobuf/empty.proto";
|
|
||||||
|
|
||||||
service RunnerService {
|
message Instruction {
|
||||||
rpc GetWork (google.protobuf.Empty) returns (stream GetWorkResponse);
|
oneof instruction {
|
||||||
rpc BuildFinished (stream BuildFinishedRequest) returns (google.protobuf.Empty);
|
Build build = 1;
|
||||||
rpc TestFinished (stream TestFinishedRequest) returns (google.protobuf.Empty);
|
Run run = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message Test {
|
message Result {
|
||||||
uint32 test_id = 1;
|
oneof result {
|
||||||
uint32 language_id = 2;
|
BuildResult build = 1;
|
||||||
bytes solution_executable = 3;
|
RunResult run = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
message Build {
|
message Build {
|
||||||
uint32 solution_id = 1;
|
int32 solution_id = 1; // FIXME: make private
|
||||||
uint32 language_id = 2;
|
string binding_key = 2;
|
||||||
bytes solution_code = 3;
|
int32 language = 3;
|
||||||
|
string solution = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetWorkResponse {
|
message BuildResult {
|
||||||
oneof work {
|
int32 solution_id = 1; // FIXME: make private
|
||||||
Test test = 1;
|
int32 status = 2;
|
||||||
Build build = 2;
|
|
||||||
bool no_work = 3;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message TestFinishedRequest {
|
message Run {
|
||||||
uint32 test = 1;
|
int32 solution_id = 1; // FIXME: make private
|
||||||
uint32 result = 2;
|
int32 test_id = 2;
|
||||||
|
string binding_key = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BuildFinishedRequest {
|
message RunResult {
|
||||||
uint32 solution_id = 1;
|
int32 solution_id = 1; // FIXME: make private
|
||||||
bytes solution_executable = 2;
|
int32 test_id = 2;
|
||||||
|
int32 status = 3;
|
||||||
}
|
}
|
||||||
|
|
18
tester/v1/tester.proto
Normal file
18
tester/v1/tester.proto
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package tester.v1;
|
||||||
|
option go_package = "/tester/v1;testerv1";
|
||||||
|
|
||||||
|
service TesterService {
|
||||||
|
rpc CreateSolution (CreateSolutionRequest) returns (stream TestingState);
|
||||||
|
}
|
||||||
|
|
||||||
|
message CreateSolutionRequest {
|
||||||
|
int32 task_id = 1;
|
||||||
|
int32 language = 2;
|
||||||
|
string solution = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TestingState {
|
||||||
|
string msg = 1;
|
||||||
|
}
|
Loading…
Reference in a new issue