move work on execution service

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2016-12-05 14:15:03 -08:00
parent dd5f74edec
commit c857213b4c
15 changed files with 596 additions and 1016 deletions

File diff suppressed because it is too large Load diff

View file

@ -11,50 +11,49 @@ service ContainerService {
rpc Pause(PauseContainerRequest) returns (google.protobuf.Empty);
rpc Resume(ResumeContainerRequest) returns (google.protobuf.Empty);
rpc CreateProcess(CreateProcessRequest) returns (CreateProcessResponse);
rpc GetProcess(GetProcessRequest) returns (GetProcessResponse);
rpc StartProcess(StartProcessRequest) returns (StartProcessResponse);
rpc GetProcess(GetProcessRequest) returns (GetProcessResponse);
rpc SignalProcess(SignalProcessRequest) returns (google.protobuf.Empty);
rpc DeleteProcess(DeleteProcessRequest) returns (google.protobuf.Empty);
rpc ListProcesses(ListProcessesRequest) returns (ListProcessesResponse);
}
message CreateProcessRequest {
string container_id = 1;
Process process = 2;
string stdin = 3;
message StartProcessRequest {
string container_id = 1;
Process process = 2;
string stdin = 3;
string stdout = 4;
string stderr = 5;
}
message CreateProcessResponse {
Process process = 1;
message StartProcessResponse {
Process process = 1;
}
message Container {
string id = 1 [(gogoproto.customname) = "ID"];
string bundle_path = 2;
Process process = 3;
Status status = 4;
string bundle_path = 2;
Process process = 3;
Status status = 4;
}
message Process {
string id = 1 [(gogoproto.customname) = "ID"];
uint64 pid = 2;
int64 pid = 2;
repeated string args = 3;
repeated string env = 4;
User user = 5;
string cwd = 6;
bool terminal = 7;
Status status = 8;
uint32 exit_status = 9;
Status status = 8;
uint32 exit_status = 9;
}
enum Status {
CREATED = 0;
RUNNING = 1;
STOPPED = 2;
PAUSED = 3;
CREATED = 0;
RUNNING = 1;
STOPPED = 2;
PAUSED = 3;
}
message User {
@ -73,7 +72,7 @@ message GetContainerResponse {
message UpdateContainerRequest {
Container container = 1;
string bundle_path = 2;
string bundle_path = 2;
}
message PauseContainerRequest {
@ -84,38 +83,30 @@ message ResumeContainerRequest {
string id = 1 [(gogoproto.customname) = "ID"];
}
message StartProcessRequest {
Process process = 1;
}
message StartProcessResponse {
Process process = 1;
}
message GetProcessRequest {
Container container = 1;
string process_id = 2;
Container container = 1;
int64 pid = 2;
}
message GetProcessResponse {
Process process = 1;
Process process = 1;
}
message SignalProcessRequest {
Process process = 1;
uint32 signal = 2;
Container container = 1;
Process process = 2;
uint32 signal = 3;
}
message DeleteProcessRequest {
Process process = 1;
Container container = 1;
Process process = 2;
}
message ListProcessesRequest {
Container container = 1;
Container container = 1;
}
message ListProcessesResponse {
repeated Process processes = 1;
repeated Process processes = 1;
}

View file

@ -16,8 +16,8 @@
DeleteContainerResponse
ListContainersRequest
ListContainersResponse
CreateProcessRequest
CreateProcessResponse
StartProcessRequest
StartProcessResponse
Container
Process
User
@ -26,8 +26,6 @@
UpdateContainerRequest
PauseContainerRequest
ResumeContainerRequest
StartProcessRequest
StartProcessResponse
GetProcessRequest
GetProcessResponse
SignalProcessRequest

View file

@ -14,8 +14,8 @@ service ExecutionService{
message CreateContainerRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string bundle_path = 2;
string stdin = 3;
string bundle_path = 2;
string stdin = 3;
string stdout = 4;
string stderr = 5;
}
@ -38,5 +38,3 @@ message ListContainersRequest {
message ListContainersResponse {
repeated Container containers = 1;
}