diff --git a/gettest/v1/gettest.proto b/gettest/v1/gettest.proto deleted file mode 100644 index 30803d1..0000000 --- a/gettest/v1/gettest.proto +++ /dev/null @@ -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; -} diff --git a/runner/v1/runner.proto b/runner/v1/runner.proto new file mode 100644 index 0000000..d7a165d --- /dev/null +++ b/runner/v1/runner.proto @@ -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; +}