2016-11-28 23:28:38 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package containerd.v1;
|
|
|
|
|
2016-12-01 23:27:52 +00:00
|
|
|
import "api/mount/mount.proto";
|
2016-12-01 20:36:19 +00:00
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
service Execution {
|
|
|
|
rpc CreateContainer(CreateContainerRequest) returns (CreateContainerResponse);
|
|
|
|
rpc StartContainer(StartContainerRequest) returns (StartContainerResponse);
|
|
|
|
rpc DeleteContainer(DeleteContainerRequest) returns (DeleteContainerResponse);
|
|
|
|
rpc StateContainer(StateContainerRequest) returns (StateContainerResponse);
|
|
|
|
rpc UpdateContainer(UpdateContainerRequest) returns (UpdateContainerResponse);
|
|
|
|
rpc PauseContainer(PauseContainerRequest) returns (PauseContainerResponse);
|
|
|
|
rpc ResumeContainer(ResumeContainerRequest) returns (ResumeContainerResponse);
|
2016-11-28 23:28:38 +00:00
|
|
|
|
2016-12-01 20:22:05 +00:00
|
|
|
rpc ContainerList(ContainerListRequest) returns (ContainerListResponse);
|
2016-11-29 23:36:08 +00:00
|
|
|
|
2016-12-01 20:22:05 +00:00
|
|
|
rpc CreateProcess(CreateProcessRequest) returns (CreateProcessResponse);
|
|
|
|
rpc StartProcess(StartProcessRequest) returns (StartProcessResponse);
|
|
|
|
rpc ProcessState(ProcessStateRequest) returns (ProcessStateResponse);
|
|
|
|
rpc SignalProcess(SignalProcessRequest) returns (SignalProcessResponse);
|
|
|
|
rpc DeleteProcess(DeleteProcessRequest) returns (DeleteProcessResponse);
|
|
|
|
rpc ProcessList(ProcessListRequest) returns (ProcessListResponse);
|
2016-11-28 23:28:38 +00:00
|
|
|
|
2016-12-01 20:22:05 +00:00
|
|
|
rpc Events(EventsRequest) returns (stream EventsResponse);
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Container {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
repeated Mount mounts = 2;
|
|
|
|
string owner = 3;
|
|
|
|
Process process = 4;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Process {
|
2016-12-01 20:22:05 +00:00
|
|
|
uint64 pid = 1;
|
|
|
|
repeated string args = 2;
|
|
|
|
repeated string env = 3;
|
|
|
|
User user = 4;
|
|
|
|
string cwd = 5;
|
|
|
|
bool terminal = 6;
|
2016-11-30 00:52:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessSpec {
|
2016-12-01 20:22:05 +00:00
|
|
|
repeated string args = 1;
|
|
|
|
repeated string env = 2;
|
|
|
|
User user = 3;
|
|
|
|
string cwd = 4;
|
|
|
|
bool terminal = 5;
|
|
|
|
string stdin = 6;
|
|
|
|
string stdout = 7;
|
|
|
|
string stderr = 8;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message User {
|
|
|
|
uint32 uid = 1;
|
|
|
|
uint32 gid = 2;
|
2016-12-01 20:22:05 +00:00
|
|
|
repeated uint32 additionalGids = 3;
|
2016-11-28 23:28:38 +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"];
|
|
|
|
ProcessSpec process = 2;
|
|
|
|
repeated Mount mounts = 3;
|
|
|
|
string owner = 4;
|
|
|
|
string config_path = 5;
|
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-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message StartContainerRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 18:27:31 +00:00
|
|
|
message State {
|
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message StartContainerResponse {
|
2016-12-01 20:22:05 +00:00
|
|
|
State state = 1;
|
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"];
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message DeleteContainerResponse {
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 18:27:31 +00:00
|
|
|
message ContainerListRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
repeated string owner = 1;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-11-29 23:36:08 +00:00
|
|
|
message ContainerListResponse {
|
2016-12-01 20:22:05 +00:00
|
|
|
repeated Container containers = 1;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message StateContainerRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message StateContainerResponse {
|
2016-12-01 20:22:05 +00:00
|
|
|
Container container = 1;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
2016-12-01 18:27:31 +00:00
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message UpdateContainerRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message UpdateContainerResponse {
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message PauseContainerRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message PauseContainerResponse {
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message ResumeContainerRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
2016-12-01 21:57:51 +00:00
|
|
|
message ResumeContainerResponse {
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateProcessRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
ProcessSpec spec = 2;
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateProcessResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message StartProcessRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string cid = 1;
|
|
|
|
string pid = 2;
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message StartProcessResponse {
|
2016-12-01 20:22:05 +00:00
|
|
|
uint32 pid = 1;
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessStateRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string cid = 1;
|
|
|
|
string pid = 2;
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessStateResponse {
|
2016-12-01 20:22:05 +00:00
|
|
|
State state = 1;
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SignalProcessRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string cid = 1;
|
|
|
|
string pid = 2;
|
|
|
|
uint32 signal = 3;
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SignalProcessResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteProcessRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string cid = 1;
|
|
|
|
string pid = 2;
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteProcessResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessListRequest {
|
2016-12-01 20:22:05 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2016-12-01 18:27:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessListResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message EventsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message EventsResponse {
|
|
|
|
}
|