123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- syntax = "proto3";
- import "google/protobuf/empty.proto";
- service TaskRunner {
- rpc StartContainer (google.protobuf.Empty) returns (StartContainerResponse);
- rpc StopContainer (StopContainerRequest) returns (StopContainerResponse);
- rpc RunCommand (RunCommandRequest) returns (stream RunCommandResponse);
- rpc FileExists (FileExistsRequest) returns (FileExistsResponse);
- rpc GetFile (GetFileRequest) returns (GetFileResponse);
- rpc PutFile (PutFileRequest) returns (PutFileResponse);
- }
- message StartContainerResponse {
- string id = 1;
- }
- message StopContainerRequest {
- string id = 1;
- }
- message StopContainerResponse {
- string id = 1;
- }
- message RunCommandRequest {
- string id = 1;
- repeated string command = 2;
- }
- message RunCommandResponse {
- string id = 1;
- optional string msg = 2;
- }
- message FileExistsRequest {
- string id = 1;
- string path = 2;
- }
- message FileExistsResponse {
- string id = 1;
- string path = 2;
- optional bool exists = 3;
- }
- message GetFileRequest {
- string id = 1;
- string path = 2;
- }
- message GetFileResponse {
- string id = 1;
- string oss_object_key = 2;
- }
- message PutFileRequest {
- string id = 1;
- optional string oss_object_key = 2;
- optional string local_path = 3;
- optional bytes payload = 4;
- string path = 5;
- }
- message PutFileResponse {
- string id = 1;
- string path = 2;
- bool success = 3;
- }
|