@@ -2,13 +2,20 @@ syntax = "proto3";
22
33import "aeon_error.proto" ;
44import "aeon_value.proto" ;
5+ import "aeon_schema.proto" ;
56
67package aeon ;
78
89// Internal API to Aeon - a distributed database based on Tarantool.
910service InternalService {
1011 // Get the gRPC server sideservice configuration.
1112 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 ) {}
1219}
1320
1421// Get the gRPC server sideservice configuration.
@@ -44,3 +51,68 @@ message GetConfigResponse {
4451 // The gRPC server sideservice configuration.
4552 Config config = 2 ;
4653}
54+
55+ // Find space by name in space cache.
56+
57+ message FindSpaceRequest {
58+ // Name of the space to find.
59+ string name = 1 ;
60+ }
61+
62+ message FindSpaceResponse {
63+ // Error information. Set only on failure.
64+ Error error = 1 ;
65+ // Definition of the found space.
66+ SpaceDef space = 2 ;
67+ }
68+
69+ // Find range by space name and a key in range cache.
70+
71+ // Description of a range.
72+ message Range {
73+ // The range ID.
74+ string id = 1 ;
75+ // The shard where the range is located.
76+ string shard = 2 ;
77+ // The space to which the range belongs.
78+ string space = 3 ;
79+ // Raw format of the space.
80+ Value format = 4 ;
81+ // Raw key definition of the space.
82+ Value key_def = 5 ;
83+ // Minimum key of the range.
84+ Tuple begin = 6 ;
85+ // Supremum key of the range, not included into the range.
86+ Tuple end = 7 ;
87+ // The state of the range.
88+ string state = 8 ;
89+ // The epoch of the range.
90+ uint64 epoch = 9 ;
91+ // The timestamp of the last change to the range.
92+ uint64 timestamp = 10 ;
93+ // The context of the range.
94+ Value context = 11 ;
95+ }
96+
97+ message FindRangeRequest {
98+ // The name of the space in which to search for the range.
99+ string space = 1 ;
100+ // Key from the range.
101+ Tuple key = 2 ;
102+ }
103+
104+ message FindRangeResponse {
105+ // Error information. Set only on failure.
106+ Error error = 1 ;
107+ // Description of the found range.
108+ Range range = 2 ;
109+ }
110+
111+ // Update space and range caches.
112+
113+ message UpdateCacheRequest {}
114+
115+ message UpdateCacheResponse {
116+ // Error information. Set only on failure.
117+ Error error = 1 ;
118+ }
0 commit comments