-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaeon_internal.proto
124 lines (107 loc) · 3.12 KB
/
aeon_internal.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
syntax = "proto3";
import "aeon_error.proto";
import "aeon_value.proto";
import "aeon_schema.proto";
package aeon;
// Internal API to Aeon - a distributed database based on Tarantool.
service InternalService {
// Get the gRPC server sideservice configuration.
rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) {}
// Find space by name in space cache.
rpc FindSpace(FindSpaceRequest) returns (FindSpaceResponse) {}
// Find range by space name and a key in range cache.
rpc FindRange(FindRangeRequest) returns (FindRangeResponse) {}
// Update space cache.
rpc UpdateCache(UpdateCacheRequest) returns (UpdateCacheResponse) {}
}
// Description of a range.
message Range {
// The shard where the range is located.
string shard = 1;
// The range ID.
string id = 2;
// The space to which the range belongs.
string space = 3;
// Format of the space.
repeated FieldDef format = 4;
// Key definition of the space.
repeated KeyPartDef key_def = 5;
// Minimum key of the range.
Tuple key_begin = 6;
// Supremum key of the range, not included into the range.
Tuple key_end = 7;
// The state of the range.
string state = 8;
// The epoch of the range.
uint64 epoch = 9;
// The timestamp of the last change to the range.
uint64 timestamp = 10;
// The context of the range.
Value context = 11;
}
// Get the gRPC server sideservice configuration.
// Instance configuration.
message Config {
// Tarantool instance information.
message Instance {
// Instance name.
string name = 1;
// Instance replicaset.
string replicaset = 2;
// Instance group.
string group = 3;
// Instance URI.
Value uri = 4;
// Instance roles.
repeated string roles = 5;
}
// Name of the associated Tarantool instance.
string name = 1;
// The configuration of "aeon.grpc" role of the associated Tarantool instance.
Value params = 2;
// Information about all instances from Tarantool configuration.
repeated Instance instances = 3;
}
message GetConfigRequest {}
message GetConfigResponse {
// Error information. Set only on failure.
Error error = 1;
// The gRPC server sideservice configuration.
Config config = 2;
}
// Find space by name in space cache.
message FindSpaceRequest {
// Name of the space to find.
string name = 1;
}
message FindSpaceResponse {
// Error information. Set only on failure.
Error error = 1;
// Name of the found space.
string name = 2;
// Format of the found space.
repeated FieldDef format = 3;
// Key definition of the found space.
repeated KeyPartDef key_def = 4;
// The engine of the found space.
Engine engine = 5;
}
// Find range by space name and a key in range cache.
message FindRangeRequest {
// The name of the space in which to search for the range.
string space = 1;
// Key from the range.
Tuple key = 2;
}
message FindRangeResponse {
// Error information. Set only on failure.
Error error = 1;
// Description of the found range.
Range range = 2;
}
// Update space and range caches.
message UpdateCacheRequest {}
message UpdateCacheResponse {
// Error information. Set only on failure.
Error error = 1;
}