[#1089] control: Format proto files with clang-format

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-04-11 17:01:19 +03:00
parent 50ec4febcc
commit f8973f9b05
2 changed files with 503 additions and 506 deletions

View file

@ -6,65 +6,82 @@ import "pkg/services/control/types.proto";
option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/control";
// `ControlService` provides an interface for internal work with the storage node.
// `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);
rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse);
// Sets status of the storage node in FrostFS network map.
rpc SetNetmapStatus (SetNetmapStatusRequest) returns (SetNetmapStatusResponse);
rpc SetNetmapStatus(SetNetmapStatusRequest) returns (SetNetmapStatusResponse);
// Mark objects to be removed from node's local object storage.
rpc DropObjects (DropObjectsRequest) returns (DropObjectsResponse);
rpc DropObjects(DropObjectsRequest) returns (DropObjectsResponse);
// Returns list that contains information about all shards of a node.
rpc ListShards (ListShardsRequest) returns (ListShardsResponse);
rpc ListShards(ListShardsRequest) returns (ListShardsResponse);
// Sets mode of the shard.
rpc SetShardMode (SetShardModeRequest) returns (SetShardModeResponse);
rpc SetShardMode(SetShardModeRequest) returns (SetShardModeResponse);
// Synchronizes all log operations for the specified tree.
rpc SynchronizeTree (SynchronizeTreeRequest) returns (SynchronizeTreeResponse);
rpc SynchronizeTree(SynchronizeTreeRequest) returns (SynchronizeTreeResponse);
// EvacuateShard moves all data from one shard to the others.
// Deprecated: Use StartShardEvacuation/GetShardEvacuationStatus/StopShardEvacuation
rpc EvacuateShard (EvacuateShardRequest) returns (EvacuateShardResponse);
// Deprecated: Use
// StartShardEvacuation/GetShardEvacuationStatus/StopShardEvacuation
rpc EvacuateShard(EvacuateShardRequest) returns (EvacuateShardResponse);
// StartShardEvacuation starts moving all data from one shard to the others.
rpc StartShardEvacuation (StartShardEvacuationRequest) returns (StartShardEvacuationResponse);
rpc StartShardEvacuation(StartShardEvacuationRequest)
returns (StartShardEvacuationResponse);
// GetShardEvacuationStatus returns evacuation status.
rpc GetShardEvacuationStatus (GetShardEvacuationStatusRequest) returns (GetShardEvacuationStatusResponse);
rpc GetShardEvacuationStatus(GetShardEvacuationStatusRequest)
returns (GetShardEvacuationStatusResponse);
// ResetShardEvacuationStatus resets evacuation status if there is no running evacuation process.
rpc ResetShardEvacuationStatus (ResetShardEvacuationStatusRequest) returns (ResetShardEvacuationStatusResponse);
// ResetShardEvacuationStatus resets evacuation status if there is no running
// evacuation process.
rpc ResetShardEvacuationStatus(ResetShardEvacuationStatusRequest)
returns (ResetShardEvacuationStatusResponse);
// StopShardEvacuation stops moving all data from one shard to the others.
rpc StopShardEvacuation (StopShardEvacuationRequest) returns (StopShardEvacuationResponse);
rpc StopShardEvacuation(StopShardEvacuationRequest)
returns (StopShardEvacuationResponse);
// FlushCache moves all data from one shard to the others.
rpc FlushCache (FlushCacheRequest) returns (FlushCacheResponse);
rpc FlushCache(FlushCacheRequest) returns (FlushCacheResponse);
// Doctor performs storage restructuring operations on engine.
rpc Doctor (DoctorRequest) returns (DoctorResponse);
rpc Doctor(DoctorRequest) returns (DoctorResponse);
// Add local access policy engine overrides to a node.
rpc AddChainLocalOverride (AddChainLocalOverrideRequest) returns (AddChainLocalOverrideResponse);
rpc AddChainLocalOverride(AddChainLocalOverrideRequest)
returns (AddChainLocalOverrideResponse);
// Get local access policy engine overrides stored in the node by chain id.
rpc GetChainLocalOverride (GetChainLocalOverrideRequest) returns (GetChainLocalOverrideResponse);
rpc GetChainLocalOverride(GetChainLocalOverrideRequest)
returns (GetChainLocalOverrideResponse);
// List local access policy engine overrides stored in the node by container id.
rpc ListChainLocalOverrides (ListChainLocalOverridesRequest) returns (ListChainLocalOverridesResponse);
// 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);
// Remove local access policy engine overrides stored in the node by chaind
// id.
rpc RemoveChainLocalOverride(RemoveChainLocalOverrideRequest)
returns (RemoveChainLocalOverrideResponse);
// Remove local access policy engine overrides stored in the node by chaind id.
rpc RemoveChainLocalOverridesByTarget (RemoveChainLocalOverridesByTargetRequest) returns (RemoveChainLocalOverridesByTargetResponse);
// Remove local access policy engine overrides stored in the node by chaind
// id.
rpc RemoveChainLocalOverridesByTarget(
RemoveChainLocalOverridesByTargetRequest)
returns (RemoveChainLocalOverridesByTargetResponse);
// List targets of the local APE overrides stored in the node.
rpc ListTargetsLocalOverrides (ListTargetsLocalOverridesRequest) returns (ListTargetsLocalOverridesResponse);
rpc ListTargetsLocalOverrides(ListTargetsLocalOverridesRequest)
returns (ListTargetsLocalOverridesResponse);
// Flush objects from write-cache and move it to degraded read only mode.
rpc SealWriteCache(SealWriteCacheRequest) returns (SealWriteCacheResponse);
@ -76,8 +93,7 @@ service ControlService {
// Health check request.
message HealthCheckRequest {
// Health check request body.
message Body {
}
message Body {}
// Body of health check request message.
Body body = 1;
@ -131,8 +147,7 @@ message SetNetmapStatusRequest {
// Set netmap status response.
message SetNetmapStatusResponse {
// Set netmap status response body
message Body {
}
message Body {}
// Body of set netmap status response message.
Body body = 1;
@ -160,8 +175,7 @@ message DropObjectsRequest {
// Response to request to drop the objects.
message DropObjectsResponse {
// Response body structure.
message Body {
}
message Body {}
// Body of the response message.
Body body = 1;
@ -173,8 +187,7 @@ message DropObjectsResponse {
// Request to list all shards of the node.
message ListShardsRequest {
// Request body structure.
message Body {
}
message Body {}
// Body of the request message.
Body body = 1;
@ -222,8 +235,7 @@ message SetShardModeRequest {
// SetShardMode response.
message SetShardModeResponse {
// Response body structure.
message Body {
}
message Body {}
// Body of set shard mode response message.
Body body = 1;
@ -252,8 +264,7 @@ message SynchronizeTreeRequest {
// SynchronizeTree response.
message SynchronizeTreeResponse {
// Response body structure.
message Body {
}
message Body {}
// Body of restore shard response message.
Body body = 1;
@ -262,7 +273,6 @@ message SynchronizeTreeResponse {
Signature signature = 2;
}
// EvacuateShard request.
message EvacuateShardRequest {
// Request body structure.
@ -281,9 +291,7 @@ message EvacuateShardRequest {
// EvacuateShard response.
message EvacuateShardResponse {
// Response body structure.
message Body {
uint32 count = 1;
}
message Body { uint32 count = 1; }
Body body = 1;
Signature signature = 2;
@ -295,7 +303,8 @@ message FlushCacheRequest {
message Body {
// ID of the shard.
repeated bytes shard_ID = 1;
// If true, then writecache will be left in read-only mode after flush completed.
// If true, then writecache will be left in read-only mode after flush
// completed.
bool seal = 2;
}
@ -306,14 +315,12 @@ message FlushCacheRequest {
// FlushCache response.
message FlushCacheResponse {
// Response body structure.
message Body {
}
message Body {}
Body body = 1;
Signature signature = 2;
}
// Doctor request.
message DoctorRequest {
// Request body structure.
@ -331,8 +338,7 @@ message DoctorRequest {
// Doctor response.
message DoctorResponse {
// Response body structure.
message Body {
}
message Body {}
Body body = 1;
Signature signature = 2;
@ -390,16 +396,13 @@ message GetShardEvacuationStatusResponse {
}
// Unix timestamp value.
message UnixTimestamp {
int64 value = 1;
}
message UnixTimestamp { int64 value = 1; }
// Duration in seconds.
message Duration {
int64 seconds = 1;
}
message Duration { int64 seconds = 1; }
// Total objects to evacuate count. The value is approximate, so evacuated + failed + skipped == total is not guaranteed after completion.
// Total objects to evacuate count. The value is approximate, so evacuated +
// failed + skipped == total is not guaranteed after completion.
uint64 total_objects = 1;
// Evacuated objects count.
uint64 evacuated_objects = 2;
@ -587,8 +590,7 @@ message RemoveChainLocalOverrideRequest {
}
message RemoveChainLocalOverrideResponse {
message Body {
}
message Body {}
Body body = 1;
@ -607,8 +609,7 @@ message RemoveChainLocalOverridesByTargetRequest {
}
message RemoveChainLocalOverridesByTargetResponse {
message Body {
}
message Body {}
Body body = 1;
@ -645,17 +646,14 @@ message SealWriteCacheResponse {
}
message DetachShardsRequest {
message Body {
repeated bytes shard_ID = 1;
}
message Body { repeated bytes shard_ID = 1; }
Body body = 1;
Signature signature = 2;
}
message DetachShardsResponse {
message Body {
}
message Body {}
Body body = 1;

View file

@ -7,10 +7,10 @@ option go_package = "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/con
// Signature of some message.
message Signature {
// Public key used for signing.
bytes key = 1 [json_name = "key"];
bytes key = 1 [ json_name = "key" ];
// Binary signature.
bytes sign = 2 [json_name = "signature"];
bytes sign = 2 [ json_name = "signature" ];
}
// Status of the storage node in the FrostFS network map.
@ -31,10 +31,10 @@ enum NetmapStatus {
// FrostFS node description.
message NodeInfo {
// Public key of the FrostFS node in a binary format.
bytes public_key = 1 [json_name = "publicKey"];
bytes public_key = 1 [ json_name = "publicKey" ];
// Ways to connect to a node.
repeated string addresses = 2 [json_name = "addresses"];
repeated string addresses = 2 [ json_name = "addresses" ];
// Administrator-defined Attributes of the FrostFS Storage Node.
//
@ -74,32 +74,32 @@ message NodeInfo {
// corresponding section in FrostFS Technical specification.
message Attribute {
// Key of the node attribute.
string key = 1 [json_name = "key"];
string key = 1 [ json_name = "key" ];
// Value of the node attribute.
string value = 2 [json_name = "value"];
string value = 2 [ json_name = "value" ];
// Parent keys, if any. For example for `City` it could be `Region` and
// `Country`.
repeated string parents = 3 [json_name = "parents"];
repeated string parents = 3 [ json_name = "parents" ];
}
// Carries list of the FrostFS node attributes in a key-value form. Key name
// must be a node-unique valid UTF-8 string. Value can't be empty. NodeInfo
// structures with duplicated attribute names or attributes with empty values
// will be considered invalid.
repeated Attribute attributes = 3 [json_name = "attributes"];
repeated Attribute attributes = 3 [ json_name = "attributes" ];
// Carries state of the FrostFS node.
NetmapStatus state = 4 [json_name = "state"];
NetmapStatus state = 4 [ json_name = "state" ];
}
// Network map structure.
message Netmap {
// Network map revision number.
uint64 epoch = 1 [json_name = "epoch"];
uint64 epoch = 1 [ json_name = "epoch" ];
// Nodes presented in network.
repeated NodeInfo nodes = 2 [json_name = "nodes"];
repeated NodeInfo nodes = 2 [ json_name = "nodes" ];
}
// Health status of the storage node application.
@ -123,16 +123,16 @@ enum HealthStatus {
// Shard description.
message ShardInfo {
// ID of the shard.
bytes shard_ID = 1 [json_name = "shardID"];
bytes shard_ID = 1 [ json_name = "shardID" ];
// Path to shard's metabase.
string metabase_path = 2 [json_name = "metabasePath"];
string metabase_path = 2 [ json_name = "metabasePath" ];
// Shard's blobstor info.
repeated BlobstorInfo blobstor = 3 [json_name = "blobstor"];
repeated BlobstorInfo blobstor = 3 [ json_name = "blobstor" ];
// Path to shard's write-cache, empty if disabled.
string writecache_path = 4 [json_name = "writecachePath"];
string writecache_path = 4 [ json_name = "writecachePath" ];
// Work mode of the shard.
ShardMode mode = 5;
@ -141,15 +141,15 @@ message ShardInfo {
uint32 errorCount = 6;
// Path to shard's pilorama storage.
string pilorama_path = 7 [json_name = "piloramaPath"];
string pilorama_path = 7 [ json_name = "piloramaPath" ];
}
// Blobstor component description.
message BlobstorInfo {
// Path to the root.
string path = 1 [json_name = "path"];
string path = 1 [ json_name = "path" ];
// Component type.
string type = 2 [json_name = "type"];
string type = 2 [ json_name = "type" ];
}
// Work mode of the shard.
@ -170,7 +170,6 @@ enum ShardMode {
DEGRADED_READ_ONLY = 4;
}
// ChainTarget is an object to which local overrides
// are applied.
message ChainTarget {