compose/protos/containers/v1/containers.proto

120 lines
2.6 KiB
Protocol Buffer

/*
Copyright (c) 2020 Docker Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
syntax = "proto3";
package com.docker.api.protos.containers.v1;
option go_package = "github.com/docker/api/protos/containers/v1;v1";
service Containers {
rpc List(ListRequest) returns (ListResponse);
rpc Stop(StopRequest) returns (StopResponse);
rpc Run(RunRequest) returns (RunResponse);
rpc Exec(ExecRequest) returns (ExecResponse);
rpc Logs(LogsRequest) returns (stream LogsResponse);
rpc Delete(DeleteRequest) returns (DeleteResponse);
}
message Port {
uint32 host_port = 1;
uint32 container_port = 2;
string protocol = 3;
string host_ip = 4;
}
message Container {
string id = 1;
string image = 2;
string status = 3;
string command = 4;
uint64 cpu_time = 5;
uint64 memory_usage = 6;
uint64 memory_limit = 7;
uint64 pids_current = 8;
uint64 pids_limit = 9;
repeated string labels = 10;
repeated Port ports = 11;
}
message DeleteRequest {
string id = 1;
bool force = 2;
}
message DeleteResponse {
}
message StopRequest {
string id = 1;
uint32 timeout = 2;
}
message StopResponse {
}
message RunRequest {
string id = 1;
string image = 2;
repeated Port ports = 3;
map<string, string> labels = 4;
repeated string volumes = 5;
}
message RunResponse {
}
message ExecRequest {
string id = 1;
string command = 2;
string stream_id = 3;
repeated string args = 4;
repeated string env = 5;
bool tty = 6;
}
message ExecResponse {
bytes output = 1;
}
message ListRequest {
bool all = 1;
}
message ListResponse {
repeated Container containers = 1;
}
message LogsRequest {
string container_id = 1;
bool follow = 3;
}
message LogsResponse {
bytes value = 1;
}