forked from abronan/proton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proton.proto
64 lines (50 loc) · 1.19 KB
/
proton.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
syntax = "proto3";
package proton;
import "github.com/coreos/etcd/raft/raftpb/raft.proto";
import weak "gogoproto/gogo.proto";
service Raft {
rpc JoinRaft(NodeInfo) returns (JoinRaftResponse) {}
rpc LeaveRaft(NodeInfo) returns (LeaveRaftResponse) {}
rpc Send(raftpb.Message) returns (SendResponse) {}
rpc PutObject(PutObjectRequest) returns (PutObjectResponse) {}
rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse) {}
rpc ListMembers(ListMembersRequest) returns (ListMembersResponse) {}
}
message JoinRaftResponse {
bool success = 1;
string error = 2;
repeated NodeInfo nodes = 3;
}
message LeaveRaftResponse {
bool success = 1;
string error = 2;
}
message SendResponse {
bool success = 1;
string error = 2;
}
message PutObjectRequest {
Pair object = 1;
}
message PutObjectResponse {
bool success = 1;
string error = 2;
}
message ListObjectsRequest {}
message ListObjectsResponse {
repeated Pair objects = 1;
}
message ListMembersRequest {}
message ListMembersResponse {
repeated NodeInfo members = 1;
}
message NodeInfo {
uint64 ID = 1;
string Addr = 2;
string Port = 3;
string Error = 4;
}
message Pair {
string key = 1;
bytes value = 2;
}