This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
montage.proto
104 lines (87 loc) · 2.2 KB
/
montage.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
enum MontageWireMessages {
MONTAGE_GET = 1;
MONTAGE_GET_REFERENCE = 2;
MONTAGE_GET_RESPONSE = 3;
MONTAGE_COMMAND = 4;
MONTAGE_COMMAND_RESPONSE = 5;
MONTAGE_PUT = 6;
MONTAGE_PUT_RESPONSE = 7;
MONTAGE_GET_MANY = 8;
DEPRICATED_MONTAGE_SET_REFERENCE = 9;
MONTAGE_PUT_MANY = 10;
MONTAGE_PUT_MANY_RESPONSE = 11;
MONTAGE_ERROR = 12;
MONTAGE_DELETE = 13;
MONTAGE_DELETE_RESPONSE = 14;
}
message MontageSubrequestSpec {
required bytes sub_spec = 1;
optional bytes params = 2;
}
message MontageGet {
required bytes bucket = 1;
required bytes key = 2;
optional MontageSubrequestSpec sub = 3;
}
message MontageGetMany {
/* note: will not execute subrequests!
master document will be None on
MontageGetResponse */
repeated MontageGet gets = 1;
}
message MontageGetReference {
required bytes bucket = 1;
required bytes key = 2;
repeated bytes target_buckets = 3;
}
enum MontageGetStatus {
EXISTS = 1;
MISSING = 2;
ERROR = 3;
}
message MontageObject {
optional bytes vclock = 1;
required bytes bucket = 2;
required bytes key = 3;
required bytes data = 4;
optional uint32 fetch_resolutions = 5; // informative
}
message MontageGetResponse {
repeated MontageGetStatus status = 1;
optional MontageObject master = 2; // optional b/c missing
repeated MontageObject subs = 3;
}
message MontageCommand {
required string command = 1;
optional bytes argument = 2;
}
message MontageCommandResponse {
required string status = 1;
optional bytes value = 2;
}
message MontagePut {
required MontageObject object = 1;
}
message MontagePutResponse {
required bool modified = 1;
required MontageObject object = 2; /* with siblings set */
}
message MontagePutMany {
repeated MontageObject objects = 1;
}
message MontagePutManyResponse {
repeated MontagePutResponse objects = 1;
}
message MontageDelete {
required bytes bucket = 1;
required bytes key = 2;
}
message MontageDeleteResponse {}
message MontageError {
required string error = 1;
}
message MontageEnvelope {
required MontageWireMessages mtype = 1;
required bytes msg = 2;
optional bytes msgid = 3;
}