2016-11-28 23:28:38 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package containerd.v1;
|
|
|
|
|
|
|
|
service Containers {
|
|
|
|
rpc Create(CreateRequest) returns (CreateResponse);
|
|
|
|
rpc Start(StartRequest) returns (StartResponse);
|
|
|
|
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
|
|
|
rpc State(StateRequest) returns (StateResponse);
|
|
|
|
rpc Update(UpdateRequest) returns (UpdateResponse);
|
|
|
|
rpc Pause(PauseRequest) returns (PauseResponse);
|
|
|
|
rpc Resume(ResumeRequest) returns (ResumeResponse);
|
|
|
|
|
2016-11-29 23:36:08 +00:00
|
|
|
rpc ContainerList(ContainerListRequest) returns (ContainerListResponse);
|
|
|
|
|
2016-11-28 23:28:38 +00:00
|
|
|
rpc CreateProcess(CreateProcessRequest) returns (CreateProcessResponse);
|
|
|
|
rpc StartProcess(StartProcessRequest) returns (StartProcessResponse);
|
|
|
|
rpc ProcessState(ProcessStateRequest) returns (ProcessStateResponse);
|
2016-12-01 18:27:31 +00:00
|
|
|
rpc SignalProcess(SignalProcessRequest) returns (SignalProcessResponse);
|
2016-11-28 23:28:38 +00:00
|
|
|
rpc DeleteProcess(DeleteProcessRequest) returns (DeleteProcessResponse);
|
2016-11-29 23:36:08 +00:00
|
|
|
rpc ProcessList(ProcessListRequest) returns (ProcessListResponse);
|
2016-11-28 23:28:38 +00:00
|
|
|
|
|
|
|
rpc Events(EventsRequest) returns (stream EventsResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message Container {
|
|
|
|
string id = 1;
|
2016-11-30 00:52:04 +00:00
|
|
|
repeated Mount mounts = 2;
|
2016-12-01 18:27:31 +00:00
|
|
|
string owner = 3;
|
2016-11-29 23:36:08 +00:00
|
|
|
Process process = 4;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Process {
|
2016-11-30 00:52:04 +00:00
|
|
|
uint64 pid = 1;
|
2016-12-01 18:27:31 +00:00
|
|
|
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-11-28 23:28:38 +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;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Mount {
|
2016-12-01 18:27:31 +00:00
|
|
|
string source = 1;
|
|
|
|
string target = 2;
|
|
|
|
string type = 3;
|
|
|
|
repeated string options = 4;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message User {
|
|
|
|
uint32 uid = 1;
|
|
|
|
uint32 gid = 2;
|
2016-12-01 18:27:31 +00:00
|
|
|
repeated uint32 additionalGids = 3;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateRequest {
|
2016-11-29 23:36:08 +00:00
|
|
|
string id = 1;
|
2016-11-30 00:52:04 +00:00
|
|
|
ProcessSpec process = 2;
|
2016-11-29 23:36:08 +00:00
|
|
|
repeated Mount mounts = 3;
|
2016-12-01 18:27:31 +00:00
|
|
|
string owner = 4;
|
|
|
|
string config_path = 5;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message CreateResponse {
|
2016-11-29 23:36:08 +00:00
|
|
|
Container container = 1;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message StartRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
2016-12-01 18:27:31 +00:00
|
|
|
message State {
|
|
|
|
}
|
|
|
|
|
2016-11-28 23:28:38 +00:00
|
|
|
message StartResponse {
|
2016-11-29 23:36:08 +00:00
|
|
|
State state = 1;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteResponse {
|
|
|
|
}
|
|
|
|
|
2016-12-01 18:27:31 +00:00
|
|
|
message ContainerListRequest {
|
|
|
|
repeated string owner = 1;
|
2016-11-28 23:28:38 +00:00
|
|
|
}
|
|
|
|
|
2016-11-29 23:36:08 +00:00
|
|
|
message ContainerListResponse {
|
2016-11-28 23:28:38 +00:00
|
|
|
repeated Container containers = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StateRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StateResponse {
|
|
|
|
Container container = 1;
|
|
|
|
}
|
2016-12-01 18:27:31 +00:00
|
|
|
|
|
|
|
message UpdateRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UpdateResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message PauseRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PauseResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ResumeRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ResumeResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateProcessRequest {
|
|
|
|
string id = 1;
|
|
|
|
ProcessSpec spec = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateProcessResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message StartProcessRequest {
|
|
|
|
string cid = 1;
|
|
|
|
string pid = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StartProcessResponse {
|
|
|
|
uint32 pid = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessStateRequest {
|
|
|
|
string cid = 1;
|
|
|
|
string pid = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessStateResponse {
|
|
|
|
State state = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SignalProcessRequest {
|
|
|
|
string cid = 1;
|
|
|
|
string pid = 2;
|
|
|
|
uint32 signal = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SignalProcessResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteProcessRequest {
|
|
|
|
string cid = 1;
|
|
|
|
string pid = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteProcessResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessListRequest {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ProcessListResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message EventsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message EventsResponse {
|
|
|
|
}
|