File size: 1,104 Bytes
84d2a97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
syntax = "proto3";

package qdrant;
option csharp_namespace = "Qdrant.Client.Grpc";

import "google/protobuf/empty.proto";

service Raft {
  // Send Raft message to another peer
  rpc Send (RaftMessage) returns (google.protobuf.Empty);
  // Send to bootstrap peer
  // Returns uri by id if bootstrap knows this peer
  rpc WhoIs (PeerId) returns (Uri);
  // Send to bootstrap peer
  // Adds peer to the network
  // Returns all peers
  rpc AddPeerToKnown (AddPeerToKnownMessage) returns (AllPeers);
  // DEPRECATED
  // Its functionality is now included in `AddPeerToKnown`
  //
  // Send to bootstrap peer
  // Proposes to add this peer as participant of consensus
  rpc AddPeerAsParticipant (PeerId) returns (google.protobuf.Empty);
}

message RaftMessage {
    bytes message = 1;
}

message AllPeers {
    repeated Peer all_peers = 1;
    uint64 first_peer_id = 2;
}

message Peer {
    string uri = 1;
    uint64 id = 2;
}

message AddPeerToKnownMessage {
  optional string uri = 1;
  optional uint32 port = 2;
  uint64 id = 3;
}

message PeerId {
  uint64 id = 1;
}

message Uri {
  string uri = 1;
}