2023-10-17 14:49:57 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package control;
|
|
|
|
|
|
|
|
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-s3-gw/pkg/service/control";
|
|
|
|
|
|
|
|
// `ControlService` provides an interface for internal work with the storage node.
|
|
|
|
service ControlService {
|
|
|
|
// Performs health check of the storage node.
|
|
|
|
rpc HealthCheck (HealthCheckRequest) returns (HealthCheckResponse);
|
2023-10-19 13:37:35 +00:00
|
|
|
|
|
|
|
rpc AddPolicy (AddPolicyRequest) returns (AddPolicyResponse);
|
2023-10-17 14:49:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Signature of some message.
|
|
|
|
message Signature {
|
|
|
|
// Public key used for signing.
|
|
|
|
bytes key = 1 [json_name = "key"];
|
|
|
|
|
|
|
|
// Binary signature.
|
|
|
|
bytes sign = 2 [json_name = "signature"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Health check request.
|
|
|
|
message HealthCheckRequest {
|
|
|
|
// Body of health check request message.
|
|
|
|
bytes body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Health check request.
|
|
|
|
message HealthCheckResponse {
|
|
|
|
// Health check response body
|
|
|
|
message Body {
|
|
|
|
// Health status of storage node application.
|
|
|
|
HealthStatus health_status = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Body of health check response message.
|
|
|
|
Body body = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Health status of the storage node application.
|
|
|
|
enum HealthStatus {
|
|
|
|
// Undefined status, default value.
|
|
|
|
HEALTH_STATUS_UNDEFINED = 0;
|
|
|
|
|
|
|
|
// Storage node application is starting.
|
|
|
|
STARTING = 1;
|
|
|
|
|
|
|
|
// Storage node application is started and serves all services.
|
|
|
|
READY = 2;
|
|
|
|
|
|
|
|
// Storage node application is shutting down.
|
|
|
|
SHUTTING_DOWN = 3;
|
2023-10-19 13:37:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Add policy request.
|
|
|
|
message AddPolicyRequest {
|
|
|
|
// Body of health check request message.
|
|
|
|
bytes body = 1;
|
|
|
|
|
|
|
|
// Body signature.
|
|
|
|
Signature signature = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Add policy response.
|
|
|
|
message AddPolicyResponse {
|
|
|
|
|
|
|
|
}
|