[#770] control: Generate gRPC methods to manipulate APE chains

* Define new types and gRPC methods to manipulate APE chains
  in control service.
* Stub gRPC handlers for the generated methods.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2023-10-31 18:36:42 +03:00 committed by Evgenii Stratonikov
parent 70ab1ebd54
commit 3a2c319b87
5 changed files with 2465 additions and 263 deletions

View file

@ -44,6 +44,18 @@ service ControlService {
// Doctor performs storage restructuring operations on engine.
rpc Doctor (DoctorRequest) returns (DoctorResponse);
// Add local access policy engine overrides to a node.
rpc AddChainLocalOverride (AddChainLocalOverrideRequest) returns (AddChainLocalOverrideResponse);
// Get local access policy engine overrides stored in the node by chain id.
rpc GetChainLocalOverride (GetChainLocalOverrideRequest) returns (GetChainLocalOverrideResponse);
// List local access policy engine overrides stored in the node by container id.
rpc ListChainLocalOverrides (ListChainLocalOverridesRequest) returns (ListChainLocalOverridesResponse);
// Remove local access policy engine overrides stored in the node by chaind id.
rpc RemoveChainLocalOverride (RemoveChainLocalOverrideRequest) returns (RemoveChainLocalOverrideResponse);
}
// Health check request.
@ -405,3 +417,105 @@ message StopShardEvacuationResponse {
Body body = 1;
Signature signature = 2;
}
// AddChainLocalOverride request.
message AddChainLocalOverrideRequest {
message Body {
// Container id for which the overrides are applied.
bytes container_id = 1;
// Serialized rule chain.
bytes chain = 2;
}
Body body = 1;
Signature signature = 2;
}
// AddChainLocalOverride response.
message AddChainLocalOverrideResponse {
message Body {
// Chain ID assigned for the added rule chain.
string chain_id = 1;
}
Body body = 1;
Signature signature = 2;
}
// GetChainLocalOverride request.
message GetChainLocalOverrideRequest {
message Body {
// Container id for which the overrides are defined.
bytes container_id = 1;
// Chain ID assigned for the added rule chain.
string chain_id = 2;
}
Body body = 1;
Signature signature = 2;
}
// GetChainLocalOverride response.
message GetChainLocalOverrideResponse {
message Body {
// Serialized rule chain.
bytes chain = 1;
}
Body body = 1;
Signature signature = 2;
}
// ListChainLocalOverrides request.
message ListChainLocalOverridesRequest {
message Body {
// Container id for which the overrides are defined.
bytes container_id = 1;
}
Body body = 1;
Signature signature = 2;
}
// ListChainLocalOverrides response.
message ListChainLocalOverridesResponse {
message Body {
// The list of serialized rule chain.
repeated bytes chains = 1;
}
Body body = 1;
Signature signature = 2;
}
message RemoveChainLocalOverrideRequest {
message Body {
// Container id for which the overrides are defined.
bytes container_id = 1;
// Chain ID assigned for the added rule chain.
string chain_id = 2;
}
Body body = 1;
Signature signature = 2;
}
message RemoveChainLocalOverrideResponse {
message Body {
bool removed = 1;
}
Body body = 1;
Signature signature = 2;
}