When using events, it was found to be fairly unwieldy with a number of extra packages. For the most part, when interacting with the events service, we want types of the same version of the service. This has been accomplished by moving all events types into the events package. In addition, several fixes to the way events are marshaled have been included. Specifically, we defer to the protobuf type registration system to assemble events and type urls, with a little bit sheen on top of add a containerd.io oriented namespace. This has resulted in much cleaner event consumption and has removed the reliance on error prone type urls, in favor of concrete types. Signed-off-by: Stephen J Day <stephen.day@docker.com>
22 lines
542 B
Protocol Buffer
22 lines
542 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package containerd.services.events.v1;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/any.proto";
|
|
|
|
option go_package = "github.com/containerd/containerd/api/services/events/v1;events";
|
|
|
|
service Events {
|
|
rpc Stream(StreamEventsRequest) returns (stream Envelope);
|
|
}
|
|
|
|
message StreamEventsRequest {}
|
|
|
|
message Envelope {
|
|
google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
string topic = 2;
|
|
google.protobuf.Any event = 3;
|
|
}
|