2018-07-13 09:20:11 -04:00
|
|
|
syntax = "proto2";
|
|
|
|
|
|
2018-08-27 20:01:08 -07:00
|
|
|
package pubsub.pb;
|
2016-09-10 08:14:17 -07:00
|
|
|
|
|
|
|
|
message RPC {
|
2016-09-10 20:47:12 -07:00
|
|
|
repeated SubOpts subscriptions = 1;
|
|
|
|
|
repeated Message publish = 2;
|
2016-09-10 08:14:17 -07:00
|
|
|
|
2016-09-10 20:47:12 -07:00
|
|
|
message SubOpts {
|
|
|
|
|
optional bool subscribe = 1; // subscribe or unsubcribe
|
|
|
|
|
optional string topicid = 2;
|
|
|
|
|
}
|
2018-02-19 17:24:19 +02:00
|
|
|
|
2018-08-08 10:54:14 -07:00
|
|
|
optional ControlMessage control = 3;
|
2016-09-10 08:14:17 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message Message {
|
2017-01-09 09:52:07 -08:00
|
|
|
optional bytes from = 1;
|
2016-09-10 08:14:17 -07:00
|
|
|
optional bytes data = 2;
|
2016-09-10 20:47:12 -07:00
|
|
|
optional bytes seqno = 3;
|
2020-09-29 18:05:54 +03:00
|
|
|
optional string topic = 4;
|
2018-08-25 11:32:02 +03:00
|
|
|
optional bytes signature = 5;
|
|
|
|
|
optional bytes key = 6;
|
2016-09-10 08:14:17 -07:00
|
|
|
}
|
|
|
|
|
|
2018-02-19 17:24:19 +02:00
|
|
|
message ControlMessage {
|
2018-08-08 10:54:14 -07:00
|
|
|
repeated ControlIHave ihave = 1;
|
|
|
|
|
repeated ControlIWant iwant = 2;
|
|
|
|
|
repeated ControlGraft graft = 3;
|
|
|
|
|
repeated ControlPrune prune = 4;
|
2018-02-19 17:24:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ControlIHave {
|
2018-08-08 10:54:14 -07:00
|
|
|
optional string topicID = 1;
|
2020-07-24 22:44:32 +02:00
|
|
|
// implementors from other languages should use bytes here - go protobuf emits invalid utf8 strings
|
2018-08-08 10:54:14 -07:00
|
|
|
repeated string messageIDs = 2;
|
2018-02-19 17:24:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ControlIWant {
|
2020-07-24 22:44:32 +02:00
|
|
|
// implementors from other languages should use bytes here - go protobuf emits invalid utf8 strings
|
2018-08-08 10:54:14 -07:00
|
|
|
repeated string messageIDs = 1;
|
2018-02-19 17:24:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ControlGraft {
|
2018-08-08 10:54:14 -07:00
|
|
|
optional string topicID = 1;
|
2018-02-19 17:24:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ControlPrune {
|
2018-08-08 10:54:14 -07:00
|
|
|
optional string topicID = 1;
|
2019-11-21 23:04:58 +02:00
|
|
|
repeated PeerInfo peers = 2;
|
2020-05-06 20:07:42 +03:00
|
|
|
optional uint64 backoff = 3;
|
2019-11-21 23:04:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message PeerInfo {
|
|
|
|
|
optional bytes peerID = 1;
|
2020-01-22 10:23:47 -05:00
|
|
|
optional bytes signedPeerRecord = 2;
|
2021-05-11 12:55:14 -07:00
|
|
|
}
|