dht-cache/messages.proto

24 lines
504 B
Protocol Buffer
Raw Normal View History

2022-11-16 07:45:10 +00:00
syntax = "proto2";
enum Type {
BOOTSTRAP_REQUEST = 1;
BOOTSTRAP_RESPONSE = 2;
CONNECTED = 3;
DISCONNECTED = 4;
ADD_ITEM = 5;
REMOVE_ITEM = 6;
2022-12-05 11:59:46 +00:00
HEARTBEAT = 7;
2022-11-16 07:45:10 +00:00
}
message Message {
required Type type = 1;
map<string, State> bootstrap = 2; // For bootstrap events
optional bytes data = 3; // For state event
optional bytes signature = 4;
optional bytes id = 5; // For connected and disconnected events
2022-11-16 07:45:10 +00:00
}
message State {
repeated bytes connectedTo = 1;
2022-11-16 07:45:10 +00:00
}