
Because of a side-effect import, we have the possibility of pulling in several unnecessary packages that are used by the plugin and not at runtime to implement protobuf structures. Setting these imports to `weak` prevents this from happening, reducing the total import set, reducing memory usage and binary size. Signed-off-by: Stephen J Day <stephen.day@docker.com>
76 lines
1.5 KiB
Protocol Buffer
76 lines
1.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package containerd.events;
|
|
|
|
import weak "gogoproto/gogo.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "github.com/containerd/containerd/api/types/mount.proto";
|
|
import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
|
|
|
|
option go_package = "github.com/containerd/containerd/api/events;events";
|
|
option (containerd.plugin.fieldpath_all) = true;
|
|
|
|
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;
|
|
}
|
|
|
|
message TaskExecStarted {
|
|
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;
|
|
}
|