-
Notifications
You must be signed in to change notification settings - Fork 2
/
messages.proto
83 lines (60 loc) · 1.66 KB
/
messages.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
syntax = "proto3";
option objc_class_prefix = "MSG";
package messages;
service MessageStream {
rpc SubscribeToChannel (SubscriptionRequest) returns (stream Message) {}
rpc PushToQueue (Push) returns (PushOkResponse) {}
rpc CreateQueue (CreateQueueRequest) returns (CreateQueueOkResponse) {}
rpc DeleteQueue (DeleteQueueRequest) returns (DeleteQueueOkResponse) {}
rpc RebuildQueue (RebuildQueueRequest) returns (RebuildQueueOkResponse) {}
rpc CreateChannel (CreateChannelRequest) returns (CreateChannelResponse) {}
rpc DeleteChannel (DeleteChannelRequest) returns (DeleteChannelOkResponse) {}
rpc GetHeartbeat (HeartbeatRequest) returns (HeartbeatOkResponse) {}
}
message HeartbeatRequest {}
message HeartbeatOkResponse {}
message SubscriptionRequest {
string channel_id = 1;
}
message Message {
string id = 1;
bytes content = 2;
string topic = 3;
}
message Push {
bytes content = 1;
string topic = 2;
string queue_label = 3;
}
message PushOkResponse {}
message CreateQueueRequest {
string queue_label = 1;
}
message CreateQueueOkResponse {}
message RebuildQueueRequest {
string queue_label = 1;
}
message RebuildQueueOkResponse {}
message DeleteQueueRequest {
string queue_label = 1;
}
message DeleteQueueOkResponse {}
message CreateChannelRequest {
string queue_label = 1;
string topic = 2;
}
message CreateChannelResponse {
string channel_id = 1;
}
message ListQueuesRequest {}
message ListQueuesResponse {
repeated string queues = 1;
}
message ListChannelsRequest {}
message ListChannelsResponse {
repeated string channels = 1;
}
message DeleteChannelRequest {
string channel_id = 1;
}
message DeleteChannelOkResponse {}