-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessage.capnp
60 lines (49 loc) · 867 Bytes
/
message.capnp
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
@0xb1ed434000ad8669;
using Cxx = import "/capnp/c++.capnp";
$Cxx.namespace("transport");
enum CommandType {
heartbeat @0;
createCF @1;
deleteCF @2;
createCFIndex @3;
deleteCFIndex @4;
lookupOneCF @5;
openCFCursor @6;
nextCFCursor @7;
closeCFCursor @8;
bulkLoad @9;
}
enum StatusId {
ok @0;
error @1;
}
struct StatusMessage {
status @0: StatusId;
message @1: Text;
}
enum MessageResponseType {
sync @0;
async @1;
}
struct Parameter {
key @0 : Text;
value @1 : Text;
}
struct Record {
key @0 : Data;
value @1 : Data;
}
struct MessageRequest {
id @0 : UInt64;
cmd @1 : CommandType;
type @3 : MessageResponseType;
args @2 : List(Parameter);
}
struct MessageResponse {
id @0 : UInt64;
status @1 : StatusMessage;
result @2 : List(Record);
}
struct MessageResponseList {
responses @0 : List(MessageResponse);
}