protos: remove need for customname on ID fields

Credit to Aaron Lehmann for the implementation from SwarmKit.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day
2017-05-18 18:34:34 -07:00
parent 0dbe46d952
commit cb68150a2f
7 changed files with 77 additions and 21 deletions

View File

@@ -26,7 +26,7 @@ service ContainerService {
}
message CreateRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
google.protobuf.Any spec = 2;
repeated containerd.v1.types.Mount rootfs = 3;
string runtime = 4;
@@ -37,26 +37,26 @@ message CreateRequest {
}
message CreateResponse {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
uint32 pid = 2;
}
message StartRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
}
message DeleteRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
}
message DeleteResponse {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
uint32 exit_status = 2;
google.protobuf.Timestamp exited_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}
message InfoRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
}
message ListRequest {
@@ -67,7 +67,7 @@ message ListResponse {
}
message KillRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
uint32 signal = 2;
oneof pid_or_all {
bool all = 3;
@@ -79,7 +79,7 @@ message EventsRequest {
}
message ExecRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
bool terminal = 2;
string stdin = 3;
string stdout = 4;
@@ -92,27 +92,27 @@ message ExecResponse {
}
message PtyRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
uint32 pid = 2;
uint32 width = 3;
uint32 height = 4;
}
message CloseStdinRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
uint32 pid = 2;
}
message PauseRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
}
message ResumeRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
}
message ProcessesRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
}
message ProcessesResponse{

View File

@@ -31,7 +31,7 @@ service Shim {
}
message CreateRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
string bundle = 2;
string runtime = 3;
bool no_pivot = 4;
@@ -89,7 +89,7 @@ message StateRequest {
}
message StateResponse {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
string bundle = 2;
uint32 pid = 3;
containerd.v1.types.Status status = 4;
@@ -116,7 +116,7 @@ message CloseStdinRequest {
}
message ProcessesRequest {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
}
message ProcessesResponse{

View File

@@ -15,7 +15,7 @@ enum Status {
}
message Container {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
uint32 pid = 2;
Status status = 3;
}
@@ -39,7 +39,7 @@ message User {
}
message Event {
string id = 1 [(gogoproto.customname) = "ID"];
string id = 1;
enum EventType {
EXIT = 0;