Skip to content

Commit a31970c

Browse files
committed
proto: introduce error injections
This patch introduces error injections to internal API. Needed for tarantool/aeon#502
1 parent f805e6b commit a31970c

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

aeon_internal.proto

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ service InternalService {
1616
rpc FindRange(FindRangeRequest) returns (FindRangeResponse) {}
1717
// Update space cache.
1818
rpc UpdateCache(UpdateCacheRequest) returns (UpdateCacheResponse) {}
19+
// Set error injection.
20+
rpc InjectionSet(InjectionSetRequest) returns (InjectionSetResponse) {}
21+
// Clear error injection.
22+
rpc InjectionClear(InjectionClearRequest) returns (InjectionClearResponse) {}
23+
// Check if error injection is set.
24+
rpc InjectionIsSet(InjectionIsSetRequest) returns (InjectionIsSetResponse) {}
25+
// Get injection error, if it is set.
26+
rpc InjectError(InjectErrorRequest) returns (InjectErrorResponse) {}
27+
// Wait until the injection error is cleared, if one is set.
28+
rpc InjectDelay(InjectDelayRequest) returns (InjectDelayResponse) {}
1929
}
2030

2131
// Description of a range.
@@ -122,3 +132,54 @@ message UpdateCacheResponse {
122132
// Error information. Set only on failure.
123133
Error error = 1;
124134
}
135+
136+
// Set error injection.
137+
138+
message InjectionSetRequest {
139+
// Name of error injection.
140+
string name = 1;
141+
}
142+
143+
message InjectionSetResponse {}
144+
145+
// Clear error injection.
146+
147+
message InjectionClearRequest {
148+
// Name of error injection.
149+
string name = 1;
150+
}
151+
152+
message InjectionClearResponse {}
153+
154+
// Check if error injection is set.
155+
156+
message InjectionIsSetRequest {
157+
// Name of error injection.
158+
string name = 1;
159+
}
160+
161+
message InjectionIsSetResponse {
162+
// True if error injection is set, false otherwise.
163+
bool is_set = 1;
164+
}
165+
166+
// Get injection error, if it is set.
167+
168+
message InjectErrorRequest {
169+
// Name of error injection.
170+
string name = 1;
171+
}
172+
173+
message InjectErrorResponse {
174+
// Name of error injection.
175+
Error error = 1;
176+
}
177+
178+
// Wait until the injection error is cleared, if one is set.
179+
180+
message InjectDelayRequest {
181+
// Name of error injection.
182+
string name = 1;
183+
}
184+
185+
message InjectDelayResponse {}

0 commit comments

Comments
 (0)