Refactor runtime events into Task* types
This removes the RuntimeEvent super proto with enums into separate runtime event protos to be inline with the other events that are output by containerd. This also renames the runtime events into Task* events. Fixes #1071 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
github.com/containerd/containerd/api/services/events/v1/events.proto
|
||||
github.com/containerd/containerd/api/services/events/v1/image.proto
|
||||
github.com/containerd/containerd/api/services/events/v1/namespace.proto
|
||||
github.com/containerd/containerd/api/services/events/v1/runtime.proto
|
||||
github.com/containerd/containerd/api/services/events/v1/snapshot.proto
|
||||
github.com/containerd/containerd/api/services/events/v1/task.proto
|
||||
|
||||
@@ -29,17 +28,19 @@
|
||||
NamespaceCreate
|
||||
NamespaceUpdate
|
||||
NamespaceDelete
|
||||
RuntimeIO
|
||||
RuntimeMount
|
||||
RuntimeCreate
|
||||
RuntimeEvent
|
||||
RuntimeDelete
|
||||
SnapshotPrepare
|
||||
SnapshotCommit
|
||||
SnapshotRemove
|
||||
TaskCreate
|
||||
TaskStart
|
||||
TaskDelete
|
||||
TaskIO
|
||||
TaskExit
|
||||
TaskOOM
|
||||
TaskExecAdded
|
||||
TaskPaused
|
||||
TaskResumed
|
||||
TaskCheckpointed
|
||||
*/
|
||||
package events
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,56 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package containerd.services.events.v1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/containerd/containerd/api/services/events/v1;events";
|
||||
|
||||
message RuntimeIO {
|
||||
string stdin = 1;
|
||||
string stdout = 2;
|
||||
string stderr = 3;
|
||||
bool terminal = 4;
|
||||
}
|
||||
|
||||
message RuntimeMount {
|
||||
string type = 1;
|
||||
string source = 2;
|
||||
repeated string options = 3;
|
||||
}
|
||||
|
||||
message RuntimeCreate {
|
||||
string container_id = 1;
|
||||
string bundle = 2;
|
||||
repeated RuntimeMount rootfs = 3 [(gogoproto.customname) = "RootFS"];
|
||||
RuntimeIO io = 4 [(gogoproto.customname) = "IO"];
|
||||
string checkpoint = 5;
|
||||
}
|
||||
|
||||
message RuntimeEvent {
|
||||
string id = 1;
|
||||
string container_id = 2;
|
||||
enum EventType {
|
||||
EXIT = 0;
|
||||
OOM = 1;
|
||||
CREATE = 2;
|
||||
START = 3;
|
||||
EXEC_ADDED = 4;
|
||||
PAUSED = 5;
|
||||
RESUMED = 6;
|
||||
CHECKPOINTED = 7;
|
||||
}
|
||||
EventType type = 3;
|
||||
uint32 pid = 4;
|
||||
uint32 exit_status = 5;
|
||||
google.protobuf.Timestamp exited_at = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
google.protobuf.Timestamp timestamp = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message RuntimeDelete {
|
||||
string container_id = 1;
|
||||
string runtime = 2;
|
||||
uint32 exit_status = 3;
|
||||
google.protobuf.Timestamp exited_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,18 +2,67 @@ syntax = "proto3";
|
||||
|
||||
package containerd.services.events.v1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "github.com/containerd/containerd/api/types/mount.proto";
|
||||
|
||||
option go_package = "github.com/containerd/containerd/api/services/events/v1;events";
|
||||
|
||||
message TaskCreate {
|
||||
string container_id = 1;
|
||||
string bundle = 2;
|
||||
repeated containerd.types.Mount rootfs = 3;
|
||||
TaskIO io = 4 [(gogoproto.customname) = "IO"];
|
||||
string checkpoint = 5;
|
||||
uint32 pid = 6;
|
||||
}
|
||||
|
||||
message TaskStart {
|
||||
string container_id = 1;
|
||||
uint32 pid = 2;
|
||||
}
|
||||
|
||||
message TaskDelete {
|
||||
string container_id = 1;
|
||||
uint32 pid = 2;
|
||||
uint32 exit_status = 3;
|
||||
google.protobuf.Timestamp exited_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message TaskIO {
|
||||
string stdin = 1;
|
||||
string stdout = 2;
|
||||
string stderr = 3;
|
||||
bool terminal = 4;
|
||||
}
|
||||
|
||||
message TaskExit {
|
||||
string container_id = 1;
|
||||
string id = 2;
|
||||
uint32 pid = 3;
|
||||
uint32 exit_status = 4;
|
||||
google.protobuf.Timestamp exited_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
message TaskOOM {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
message TaskExecAdded {
|
||||
string container_id = 1;
|
||||
string exec_id = 2;
|
||||
uint32 pid = 3;
|
||||
}
|
||||
|
||||
message TaskPaused {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
message TaskResumed {
|
||||
string container_id = 1;
|
||||
}
|
||||
|
||||
message TaskCheckpointed {
|
||||
string container_id = 1;
|
||||
string checkpoint = 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user