@@ -2,13 +2,46 @@ syntax = "proto3";
2
2
3
3
import "aeon_error.proto" ;
4
4
import "aeon_value.proto" ;
5
+ import "aeon_schema.proto" ;
5
6
6
7
package aeon ;
7
8
8
9
// Internal API to Aeon - a distributed database based on Tarantool.
9
10
service InternalService {
10
11
// Get the gRPC server sideservice configuration.
11
12
rpc GetConfig (GetConfigRequest ) returns (GetConfigResponse ) {}
13
+ // Find space by name in space cache.
14
+ rpc FindSpace (FindSpaceRequest ) returns (FindSpaceResponse ) {}
15
+ // Find range by space name and a key in range cache.
16
+ rpc FindRange (FindRangeRequest ) returns (FindRangeResponse ) {}
17
+ // Update space cache.
18
+ rpc UpdateCache (UpdateCacheRequest ) returns (UpdateCacheResponse ) {}
19
+ }
20
+
21
+ // Description of a range.
22
+ message Range {
23
+ // The shard where the range is located.
24
+ string shard = 1 ;
25
+ // The range ID.
26
+ string id = 2 ;
27
+ // The space to which the range belongs.
28
+ string space = 3 ;
29
+ // Format of the space.
30
+ repeated FieldDef format = 4 ;
31
+ // Key definition of the space.
32
+ repeated KeyPartDef key_def = 5 ;
33
+ // Minimum key of the range.
34
+ Tuple key_begin = 6 ;
35
+ // Supremum key of the range, not included into the range.
36
+ Tuple key_end = 7 ;
37
+ // The state of the range.
38
+ string state = 8 ;
39
+ // The epoch of the range.
40
+ uint64 epoch = 9 ;
41
+ // The timestamp of the last change to the range.
42
+ uint64 timestamp = 10 ;
43
+ // The context of the range.
44
+ Value context = 11 ;
12
45
}
13
46
14
47
// Get the gRPC server sideservice configuration.
@@ -44,3 +77,48 @@ message GetConfigResponse {
44
77
// The gRPC server sideservice configuration.
45
78
Config config = 2 ;
46
79
}
80
+
81
+ // Find space by name in space cache.
82
+
83
+ message FindSpaceRequest {
84
+ // Name of the space to find.
85
+ string name = 1 ;
86
+ }
87
+
88
+ message FindSpaceResponse {
89
+ // Error information. Set only on failure.
90
+ Error error = 1 ;
91
+ // Name of the found space.
92
+ string name = 2 ;
93
+ // Format of the found space.
94
+ repeated FieldDef format = 3 ;
95
+ // Key definition of the found space.
96
+ repeated KeyPartDef key_def = 4 ;
97
+ // The engine of the found space.
98
+ Engine engine = 5 ;
99
+ }
100
+
101
+ // Find range by space name and a key in range cache.
102
+
103
+ message FindRangeRequest {
104
+ // The name of the space in which to search for the range.
105
+ string space = 1 ;
106
+ // Key from the range.
107
+ Tuple key = 2 ;
108
+ }
109
+
110
+ message FindRangeResponse {
111
+ // Error information. Set only on failure.
112
+ Error error = 1 ;
113
+ // Description of the found range.
114
+ Range range = 2 ;
115
+ }
116
+
117
+ // Update space and range caches.
118
+
119
+ message UpdateCacheRequest {}
120
+
121
+ message UpdateCacheResponse {
122
+ // Error information. Set only on failure.
123
+ Error error = 1 ;
124
+ }
0 commit comments