Merge container.protos

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2016-09-22 11:29:20 -07:00
parent 32a25d5523
commit b6bf350a07
4 changed files with 101 additions and 210 deletions

View file

@ -1,112 +0,0 @@
syntax = "proto3";
package "docker.containerkit.v1";
import "types.proto"
service ContainerService {
rpc Create(CreateRequest) returns (CreateResponse) {
}
rpc Start(StartRequest) returns (StartResponse) {
}
rpc Stop(StopRequest) returns (StopResponse) {
}
rpc Delete(DeleteRequest) returns (DeleteResponse) {
}
rpc List(ListRequest) returns (ListResponse) {
}
rpc State(StateRequest) returns (StateResponse) {
}
rpc Exec(ExecRequest) returns (ExecResponse) {
}
rpc Update(UpdateRequest) returns (UpdateResponse) {
}
}
message CreateRequest {
string id = 1;
string image = 2;
repeated string args = 3;
repeated string env = 4;
}
message CreateResponse {
Container container = 1;
}
message StartRequest {
string id = 1;
}
message StartResponse {
}
message StopRequest {
string id = 1;
uint32 signal = 2;
uint32 timeout = 3;
}
message StopResponse {
}
message DeleteRequest {
string id = 1;
}
message DeleteResponse {
}
message ListRequest {
}
message ListResponse {
repeated Container containers = 1;
}
message StateRequest {
string id = 1;
}
message StateResponse {
Container container = 1;
}
message ExecRequest {
string id = 1;
bool terminal = 2;
User user = 3;
repeated string args = 4;
repeated string env = 5;
string cwd = 6;
string pid = 7;
repeated string capabilities = 8;
string apparmorProfile = 9;
string selinuxLabel = 10;
bool noNewPrivileges = 11;
repeated Rlimit rlimits = 12;
}
message ExecResponse {
}
message UpdateRequest {
string id = 1;
}
message UpdateResponse {
}

View file

@ -5,12 +5,19 @@ package docker.containerkit.v1;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "github.com/docker/containerkit/api/types/mount/mount.proto";
// TODO(stevvooe): Merge this with the other container.proto. Most of this is
// scraped from swarmkit.
service Containers {
rpc Create(CreateRequest) returns (CreateResponse);
rpc Start(StartRequest) returns (StartResponse);
rpc Stop(StopRequest) returns (StopResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
rpc List(ListRequest) returns (ListResponse);
rpc State(StateRequest) returns (StateResponse);
rpc Exec(ExecRequest) returns (ExecResponse);
rpc Update(UpdateRequest) returns (UpdateResponse);
}
message Container {
ContainerSpec container = 1;
ContainerSpec container = 1;
// Runtime properties go here.
}
@ -62,4 +69,94 @@ message ContainerSpec {
repeated string groups = 9;
}
message Rlimit {
string type = 1;
uint64 soft = 2;
uint64 hard = 3;
}
message User {
uint32 uid = 1;
uint32 gid = 2;
repeated uint32 additionalGids = 3;
}
message CreateRequest {
string id = 1;
string image = 2;
repeated string args = 3;
repeated string env = 4;
}
message CreateResponse {
Container container = 1;
}
message StartRequest {
string id = 1;
}
message StartResponse {
}
message StopRequest {
string id = 1;
uint32 signal = 2;
uint32 timeout = 3;
}
message StopResponse {
}
message DeleteRequest {
string id = 1;
}
message DeleteResponse {
}
message ListRequest {
}
message ListResponse {
repeated Container containers = 1;
}
message StateRequest {
string id = 1;
}
message StateResponse {
Container container = 1;
}
message ExecRequest {
string id = 1;
bool terminal = 2;
User user = 3;
repeated string args = 4;
repeated string env = 5;
string cwd = 6;
string pid = 7;
repeated string capabilities = 8;
string apparmorProfile = 9;
string selinuxLabel = 10;
bool noNewPrivileges = 11;
repeated Rlimit rlimits = 12;
}
message ExecResponse {
}
message UpdateRequest {
string id = 1;
}
message UpdateResponse {
}

View file

@ -1,79 +0,0 @@
syntax = "proto3";
package "docker.containerkit.v1";
message NetworkStats {
string name = 1; // name of network interface
uint64 rx_bytes = 2;
uint64 rx_Packets = 3;
uint64 Rx_errors = 4;
uint64 Rx_dropped = 5;
uint64 Tx_bytes = 6;
uint64 Tx_packets = 7;
uint64 Tx_errors = 8;
uint64 Tx_dropped = 9;
}
message CpuStats {
CpuUsage cpu_usage = 1;
ThrottlingStats throttling_stats = 2;
uint64 system_usage = 3;
}
message CpuUsage {
uint64 total_usage = 1;
repeated uint64 percpu_usage = 2;
uint64 usage_in_kernelmode = 3;
uint64 usage_in_usermode = 4;
}
message ThrottlingStats {
uint64 periods = 1;
uint64 throttled_periods = 2;
uint64 throttled_time = 3;
}
message PidStats {
uint64 current = 1;
uint64 limit = 2;
}
message MemoryStats {
uint64 cache = 1;
MemoryUsage usage = 2;
MemoryUsage swap_usage = 3;
MemoryUsage kernel_usage = 4;
map<string, uint64> stats = 5;
}
message MemoryUsage {
uint64 usage = 1;
uint64 max_usage = 2;
uint64 failcnt = 3;
uint64 limit = 4;
}
message BlkioStats {
repeated BlkioEntry io_service_bytes_recursive = 1;
repeated BlkioEntry io_serviced_recursive = 2;
repeated BlkioEntry io_queued_recursive = 3;
repeated BlkioEntry io_service_time_recursive = 4;
repeated BlkioEntry io_wait_time_recursive = 5;
repeated BlkioEntry io_merged_recursive = 6;
repeated BlkioEntry io_time_recursive = 7;
repeated BlkioEntry sectors_recursive = 8;
}
message BlkioEntry {
uint64 major = 1;
uint64 minor = 2;
string op = 3;
uint64 value = 4;
}
message HugetlbStats {
uint64 usage = 1;
uint64 max_usage = 2;
uint64 failcnt = 3;
uint64 limit = 4;
}

View file

@ -1,15 +0,0 @@
syntax = "proto3";
package "docker.containerkit.v1";
message Rlimit {
string type = 1;
uint64 soft = 2;
uint64 hard = 3;
}
message User {
uint32 uid = 1;
uint32 gid = 2;
repeated uint32 additionalGids = 3;
}