Update GRPC for consistency
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package containerd.v1.services.execution;
|
||||
package containerd.services.tasks.v1;
|
||||
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
@@ -11,31 +11,47 @@ import "github.com/containerd/containerd/api/types/task/task.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
service Tasks {
|
||||
rpc Create(CreateRequest) returns (CreateResponse);
|
||||
rpc Start(StartRequest) returns (google.protobuf.Empty);
|
||||
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
||||
// Create a task.
|
||||
rpc Create(CreateTaskRequest) returns (CreateTaskResponse);
|
||||
|
||||
// Start a task.
|
||||
rpc Start(StartTaskRequest) returns (google.protobuf.Empty);
|
||||
|
||||
// Delete a task and on disk state.
|
||||
rpc Delete(DeleteTaskRequest) returns (DeleteResponse);
|
||||
|
||||
rpc DeleteProcess(DeleteProcessRequest) returns (DeleteResponse);
|
||||
rpc Info(InfoRequest) returns (InfoResponse);
|
||||
rpc List(ListRequest) returns (ListResponse);
|
||||
|
||||
rpc Get(GetTaskRequest) returns (GetTaskResponse);
|
||||
|
||||
rpc List(ListTasksRequest) returns (ListTasksResponse);
|
||||
|
||||
// Kill a task or process.
|
||||
rpc Kill(KillRequest) returns (google.protobuf.Empty);
|
||||
rpc Events(EventsRequest) returns (stream containerd.v1.types.Event);
|
||||
rpc Exec(ExecRequest) returns (ExecResponse);
|
||||
rpc Pty(PtyRequest) returns (google.protobuf.Empty);
|
||||
rpc CloseStdin(CloseStdinRequest) returns (google.protobuf.Empty);
|
||||
rpc Pause(PauseRequest) returns (google.protobuf.Empty);
|
||||
rpc Resume(ResumeRequest) returns (google.protobuf.Empty);
|
||||
rpc Processes(ProcessesRequest) returns (ProcessesResponse);
|
||||
rpc Checkpoint(CheckpointRequest) returns (CheckpointResponse);
|
||||
|
||||
rpc Exec(ExecProcessRequest) returns (ExecProcessResponse);
|
||||
|
||||
rpc ResizePty(ResizePtyRequest) returns (google.protobuf.Empty);
|
||||
|
||||
rpc CloseIO(CloseIORequest) returns (google.protobuf.Empty);
|
||||
|
||||
rpc Pause(PauseTaskRequest) returns (google.protobuf.Empty);
|
||||
|
||||
rpc Resume(ResumeTaskRequest) returns (google.protobuf.Empty);
|
||||
|
||||
rpc ListProcesses(ListProcessesRequest) returns (ListProcessesResponse);
|
||||
|
||||
rpc Checkpoint(CheckpointTaskRequest) returns (CheckpointTaskResponse);
|
||||
}
|
||||
|
||||
message CreateRequest {
|
||||
message CreateTaskRequest {
|
||||
// NOTE: reserve field 1 for task id.
|
||||
|
||||
// ContainerID specifies the container to use for creating this task.
|
||||
//
|
||||
// The spec from the provided container id will be used to create the
|
||||
// task associated with this container. Only one task can be run at a time
|
||||
// per container.
|
||||
//
|
||||
// This should be created using the Containers service.
|
||||
string container_id = 2;
|
||||
|
||||
// RootFS provides the pre-chroot mounts to perform in the shim before
|
||||
@@ -46,15 +62,15 @@ message CreateRequest {
|
||||
// the container object.
|
||||
repeated containerd.v1.types.Mount rootfs = 3;
|
||||
|
||||
string stdin = 5;
|
||||
string stdout = 6;
|
||||
string stderr = 7;
|
||||
bool terminal = 8;
|
||||
string stdin = 4;
|
||||
string stdout = 5;
|
||||
string stderr = 6;
|
||||
bool terminal = 7;
|
||||
|
||||
types.Descriptor checkpoint = 9;
|
||||
containerd.v1.types.Descriptor checkpoint = 8;
|
||||
}
|
||||
|
||||
message CreateResponse {
|
||||
message CreateTaskResponse {
|
||||
// TODO(stevvooe): We no longer have an id for a task since they are bound
|
||||
// to a single container. Although, we should represent each new task with
|
||||
// an ID so one can differentiate between each instance of a container
|
||||
@@ -68,11 +84,11 @@ message CreateResponse {
|
||||
uint32 pid = 3;
|
||||
}
|
||||
|
||||
message StartRequest {
|
||||
message StartTaskRequest {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
message DeleteRequest {
|
||||
message DeleteTaskRequest {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
@@ -87,18 +103,19 @@ message DeleteProcessRequest {
|
||||
uint32 pid = 2;
|
||||
}
|
||||
|
||||
message InfoRequest {
|
||||
message GetTaskRequest {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
message InfoResponse {
|
||||
types.Task task = 1;
|
||||
message GetTaskResponse {
|
||||
containerd.v1.types.Task task = 1;
|
||||
}
|
||||
|
||||
message ListRequest {
|
||||
message ListTasksRequest {
|
||||
string filter = 1;
|
||||
}
|
||||
|
||||
message ListResponse {
|
||||
message ListTasksResponse {
|
||||
repeated containerd.v1.types.Task tasks = 1;
|
||||
}
|
||||
|
||||
@@ -111,16 +128,14 @@ message KillRequest {
|
||||
}
|
||||
}
|
||||
|
||||
message EventsRequest {
|
||||
}
|
||||
|
||||
message ExecRequest {
|
||||
message ExecProcessRequest {
|
||||
// ContainerID specifies the container in which to exec the process.
|
||||
string container_id = 1;
|
||||
bool terminal = 2;
|
||||
string stdin = 3;
|
||||
string stdout = 4;
|
||||
string stderr = 5;
|
||||
|
||||
string stdin = 2;
|
||||
string stdout = 3;
|
||||
string stderr = 4;
|
||||
bool terminal = 5;
|
||||
|
||||
// Spec for starting a process in the target container.
|
||||
//
|
||||
@@ -128,49 +143,45 @@ message ExecRequest {
|
||||
google.protobuf.Any spec = 6;
|
||||
}
|
||||
|
||||
message ExecResponse {
|
||||
message ExecProcessResponse {
|
||||
uint32 pid = 1;
|
||||
}
|
||||
|
||||
message PtyRequest {
|
||||
message ResizePtyRequest {
|
||||
string container_id = 1;
|
||||
uint32 pid = 2;
|
||||
uint32 width = 3;
|
||||
uint32 height = 4;
|
||||
}
|
||||
|
||||
message CloseStdinRequest {
|
||||
message CloseIORequest {
|
||||
string container_id = 1;
|
||||
uint32 pid = 2;
|
||||
bool stdin = 3;
|
||||
}
|
||||
|
||||
message PauseRequest {
|
||||
message PauseTaskRequest {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
message ResumeRequest {
|
||||
message ResumeTaskRequest {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
message ProcessesRequest {
|
||||
message ListProcessesRequest {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
message ProcessesResponse{
|
||||
message ListProcessesResponse{
|
||||
repeated containerd.v1.types.Process processes = 1;
|
||||
}
|
||||
|
||||
message CheckpointRequest {
|
||||
message CheckpointTaskRequest {
|
||||
string container_id = 1;
|
||||
bool allow_tcp = 2;
|
||||
bool allow_unix_sockets = 3;
|
||||
bool allow_terminal = 4;
|
||||
bool file_locks = 5;
|
||||
repeated string empty_namespaces = 6;
|
||||
string parent_checkpoint = 7 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
|
||||
bool exit = 8;
|
||||
string parent_checkpoint = 2 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
|
||||
map<string, string> options = 3;
|
||||
}
|
||||
|
||||
message CheckpointResponse {
|
||||
repeated types.Descriptor descriptors = 1;
|
||||
message CheckpointTaskResponse {
|
||||
repeated containerd.v1.types.Descriptor descriptors = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user