2016-11-28 23:28:38 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package containerd.v1;
|
|
|
|
|
2016-12-03 00:04:13 +00:00
|
|
|
import "google/protobuf/empty.proto";
|
2016-12-01 20:36:19 +00:00
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
2016-12-07 22:00:20 +00:00
|
|
|
service ExecutionService {
|
2017-02-02 22:40:23 +00:00
|
|
|
rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse);
|
|
|
|
rpc StartContainer(StartContainerRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc UpdateContainer(UpdateContainerRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc PauseContainer(PauseContainerRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc ResumeContainer(ResumeContainerRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc DeleteContainer(DeleteContainerRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc GetContainer(GetContainerRequest) returns (GetContainerResponse);
|
|
|
|
rpc ListContainers(ListContainersRequest) returns (ListContainersResponse);
|
2016-12-07 22:00:20 +00:00
|
|
|
|
|
|
|
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 StartContainerRequest {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-07 22:00:20 +00:00
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message CreateContainerRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2016-12-05 22:15:03 +00:00
|
|
|
string bundle_path = 2;
|
2016-12-09 17:17:34 +00:00
|
|
|
bool console = 3;
|
|
|
|
string stdin = 4;
|
|
|
|
string stdout = 5;
|
|
|
|
string stderr = 6;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message CreateContainerResponse {
|
2016-12-01 20:22:05 +00:00
|
|
|
Container container = 1;
|
2016-12-11 19:07:32 +00:00
|
|
|
Process initProcess = 2;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message DeleteContainerRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2017-02-01 21:25:28 +00:00
|
|
|
uint32 pid = 2;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-02 18:27:51 +00:00
|
|
|
message ListContainersRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
repeated string owner = 1;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-02 18:27:51 +00:00
|
|
|
message ListContainersResponse {
|
2016-12-01 20:22:05 +00:00
|
|
|
repeated Container containers = 1;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
2016-12-07 22:00:20 +00:00
|
|
|
|
|
|
|
message StartProcessRequest {
|
2016-12-09 19:32:45 +00:00
|
|
|
string container_id = 1 [(gogoproto.customname) = "ContainerID"];
|
2016-12-07 22:00:20 +00:00
|
|
|
Process process = 2;
|
2016-12-09 17:17:34 +00:00
|
|
|
bool console = 3;
|
|
|
|
string stdin = 4;
|
|
|
|
string stdout = 5;
|
|
|
|
string stderr = 6;
|
2016-12-07 22:00:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message StartProcessResponse {
|
|
|
|
Process process = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Container {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2017-02-01 21:25:28 +00:00
|
|
|
string bundle = 2;
|
2016-12-07 22:00:20 +00:00
|
|
|
Status status = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Process {
|
2017-02-02 23:36:10 +00:00
|
|
|
uint32 pid = 1;
|
|
|
|
repeated string args = 2;
|
|
|
|
repeated string env = 3;
|
|
|
|
User user = 4;
|
|
|
|
string cwd = 5;
|
|
|
|
bool terminal = 6;
|
|
|
|
uint32 exit_status = 7;
|
2016-12-07 22:00:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum Status {
|
|
|
|
CREATED = 0;
|
|
|
|
RUNNING = 1;
|
|
|
|
STOPPED = 2;
|
|
|
|
PAUSED = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message User {
|
|
|
|
uint32 uid = 1;
|
|
|
|
uint32 gid = 2;
|
|
|
|
repeated uint32 additionalGids = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetContainerRequest {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetContainerResponse {
|
|
|
|
Container container = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateContainerRequest {
|
2016-12-09 19:32:45 +00:00
|
|
|
string container_id = 1 [(gogoproto.customname) = "ContainerID"];
|
2016-12-07 22:00:20 +00:00
|
|
|
string bundle_path = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PauseContainerRequest {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message ResumeContainerRequest {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetProcessRequest {
|
2016-12-09 19:32:45 +00:00
|
|
|
string container_id = 1 [(gogoproto.customname) = "ContainerID"];
|
2017-02-02 23:36:10 +00:00
|
|
|
uint32 pid = 2;
|
2016-12-07 22:00:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetProcessResponse {
|
|
|
|
Process process = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SignalProcessRequest {
|
2016-12-09 19:32:45 +00:00
|
|
|
string container_id = 1 [(gogoproto.customname) = "ContainerID"];
|
2017-02-02 23:36:10 +00:00
|
|
|
uint32 pid = 2;
|
2016-12-07 22:00:20 +00:00
|
|
|
uint32 signal = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteProcessRequest {
|
2016-12-09 19:32:45 +00:00
|
|
|
string container_id = 1 [(gogoproto.customname) = "ContainerID"];
|
2017-02-02 23:36:10 +00:00
|
|
|
uint32 pid = 2;
|
2016-12-07 22:00:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ListProcessesRequest {
|
2017-02-02 23:36:10 +00:00
|
|
|
string container_id = 1 [(gogoproto.customname) = "ContainerID"];
|
2016-12-07 22:00:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ListProcessesResponse {
|
|
|
|
repeated Process processes = 1;
|
|
|
|
}
|