github.com/demonoid81/containerd@v1.3.4/api/services/events/v1/events.proto (about)

     1  syntax = "proto3";
     2  
     3  package containerd.services.events.v1;
     4  
     5  import weak "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto";
     6  import weak "gogoproto/gogo.proto";
     7  import "google/protobuf/any.proto";
     8  import "google/protobuf/empty.proto";
     9  import "google/protobuf/timestamp.proto";
    10  
    11  option go_package = "github.com/containerd/containerd/api/services/events/v1;events";
    12  
    13  service Events {
    14  	// Publish an event to a topic.
    15  	//
    16  	// The event will be packed into a timestamp envelope with the namespace
    17  	// introspected from the context. The envelope will then be dispatched.
    18  	rpc Publish(PublishRequest) returns (google.protobuf.Empty);
    19  
    20  	// Forward sends an event that has already been packaged into an envelope
    21  	// with a timestamp and namespace.
    22  	//
    23  	// This is useful if earlier timestamping is required or when forwarding on
    24  	// behalf of another component, namespace or publisher.
    25  	rpc Forward(ForwardRequest) returns (google.protobuf.Empty);
    26  
    27  	// Subscribe to a stream of events, possibly returning only that match any
    28  	// of the provided filters.
    29  	//
    30  	// Unlike many other methods in containerd, subscribers will get messages
    31  	// from all namespaces unless otherwise specified. If this is not desired,
    32  	// a filter can be provided in the format 'namespace==<namespace>' to
    33  	// restrict the received events.
    34  	rpc Subscribe(SubscribeRequest) returns (stream Envelope);
    35  }
    36  
    37  message PublishRequest {
    38  	string topic = 1;
    39  	google.protobuf.Any event = 2;
    40  }
    41  
    42  message ForwardRequest {
    43  	Envelope envelope = 1;
    44  }
    45  
    46  message SubscribeRequest {
    47  	repeated string filters = 1;
    48  }
    49  
    50  message Envelope {
    51  	option (containerd.plugin.fieldpath) = true;
    52  	google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
    53  	string namespace = 2;
    54  	string topic = 3;
    55  	google.protobuf.Any event = 4;
    56  }