Goby v2
interprocess_notification.proto
1 
2 import "google/protobuf/descriptor.proto";
3 
4 package goby.common.protobuf;
5 
6 // used to filter messages on their contents
7 // instead of just type
8 message Filter
9 {
10  required string key = 1;
11  enum Operation
12  {
13  EQUAL = 1; // key == value
14  NOT_EQUAL = 2; // key != value
15  }
16  required Operation operation = 2;
17  required string value = 3;
18 }
19 
20 // encoded message payload
21 // can carry any protobuf message
22 message EmbeddedMessage
23 {
24  // encoded google protobuf message
25  // optional if request is for subscription
26  optional bytes body = 1;
27  // type [Descriptor::full_name()]
28  required string type = 2;
29  // only required if desired for initial subscription
30  optional Filter filter = 3;
31 }
32 
33 // message Notification
34 // {
35 // enum NotificationType
36 // {
37 // HEARTBEAT = 1;
38 // CONNECT_REQUEST = 2;
39 // DISCONNECT_REQUEST = 3;
40 // CONNECTION_ACCEPTED = 4;
41 // CONNECTION_DENIED = 5;
42 // PUBLISH_REQUEST = 6;
43 // SUBSCRIBE_REQUEST = 7;
44 // }
45 // required NotificationType notification_type = 1;
46 
47 // // required for connection only
48 // optional string application_name = 2;
49 
50 // // used to inform gobyd of the google protobuf type used for a
51 // // given publish or subscribe request
52 // repeated .google.protobuf.FileDescriptorProto file_descriptor_proto = 3;
53 
54 // // information about the payload
55 // optional EmbeddedMessage embedded_msg = 4;
56 
57 // // human readable explanation of this message (usually
58 // // used to report error reasoning)
59 // optional string explanation = 5;
60 // }