[#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 committed by Evgenii Stratonikov
parent 91e79c98ba
commit 0094186299
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"; 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 { service ControlService {
// Performs health check of the storage node. // 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. // 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. // 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. // 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. // Sets mode of the shard.
rpc SetShardMode (SetShardModeRequest) returns (SetShardModeResponse); rpc SetShardMode(SetShardModeRequest) returns (SetShardModeResponse);
// Synchronizes all log operations for the specified tree. // 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. // EvacuateShard moves all data from one shard to the others.
// Deprecated: Use StartShardEvacuation/GetShardEvacuationStatus/StopShardEvacuation // Deprecated: Use
rpc EvacuateShard (EvacuateShardRequest) returns (EvacuateShardResponse); // StartShardEvacuation/GetShardEvacuationStatus/StopShardEvacuation
rpc EvacuateShard(EvacuateShardRequest) returns (EvacuateShardResponse);
// StartShardEvacuation starts moving all data from one shard to the others. // 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. // 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. // ResetShardEvacuationStatus resets evacuation status if there is no running
rpc ResetShardEvacuationStatus (ResetShardEvacuationStatusRequest) returns (ResetShardEvacuationStatusResponse); // evacuation process.
rpc ResetShardEvacuationStatus(ResetShardEvacuationStatusRequest)
returns (ResetShardEvacuationStatusResponse);
// StopShardEvacuation stops moving all data from one shard to the others. // 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. // 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. // 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. // 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. // 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. // List local access policy engine overrides stored in the node by container
rpc ListChainLocalOverrides (ListChainLocalOverridesRequest) returns (ListChainLocalOverridesResponse); // id.
rpc ListChainLocalOverrides(ListChainLocalOverridesRequest)
returns (ListChainLocalOverridesResponse);
// Remove local access policy engine overrides stored in the node by chaind id. // Remove local access policy engine overrides stored in the node by chaind
rpc RemoveChainLocalOverride (RemoveChainLocalOverrideRequest) returns (RemoveChainLocalOverrideResponse); // id.
rpc RemoveChainLocalOverride(RemoveChainLocalOverrideRequest)
returns (RemoveChainLocalOverrideResponse);
// Remove local access policy engine overrides stored in the node by chaind id. // Remove local access policy engine overrides stored in the node by chaind
rpc RemoveChainLocalOverridesByTarget (RemoveChainLocalOverridesByTargetRequest) returns (RemoveChainLocalOverridesByTargetResponse); // id.
rpc RemoveChainLocalOverridesByTarget(
RemoveChainLocalOverridesByTargetRequest)
returns (RemoveChainLocalOverridesByTargetResponse);
// List targets of the local APE overrides stored in the node. // 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. // Flush objects from write-cache and move it to degraded read only mode.
rpc SealWriteCache(SealWriteCacheRequest) returns (SealWriteCacheResponse); rpc SealWriteCache(SealWriteCacheRequest) returns (SealWriteCacheResponse);
@ -76,8 +93,7 @@ service ControlService {
// Health check request. // Health check request.
message HealthCheckRequest { message HealthCheckRequest {
// Health check request body. // Health check request body.
message Body { message Body {}
}
// Body of health check request message. // Body of health check request message.
Body body = 1; Body body = 1;
@ -131,8 +147,7 @@ message SetNetmapStatusRequest {
// Set netmap status response. // Set netmap status response.
message SetNetmapStatusResponse { message SetNetmapStatusResponse {
// Set netmap status response body // Set netmap status response body
message Body { message Body {}
}
// Body of set netmap status response message. // Body of set netmap status response message.
Body body = 1; Body body = 1;
@ -160,8 +175,7 @@ message DropObjectsRequest {
// Response to request to drop the objects. // Response to request to drop the objects.
message DropObjectsResponse { message DropObjectsResponse {
// Response body structure. // Response body structure.
message Body { message Body {}
}
// Body of the response message. // Body of the response message.
Body body = 1; Body body = 1;
@ -173,8 +187,7 @@ message DropObjectsResponse {
// Request to list all shards of the node. // Request to list all shards of the node.
message ListShardsRequest { message ListShardsRequest {
// Request body structure. // Request body structure.
message Body { message Body {}
}
// Body of the request message. // Body of the request message.
Body body = 1; Body body = 1;
@ -222,8 +235,7 @@ message SetShardModeRequest {
// SetShardMode response. // SetShardMode response.
message SetShardModeResponse { message SetShardModeResponse {
// Response body structure. // Response body structure.
message Body { message Body {}
}
// Body of set shard mode response message. // Body of set shard mode response message.
Body body = 1; Body body = 1;
@ -252,8 +264,7 @@ message SynchronizeTreeRequest {
// SynchronizeTree response. // SynchronizeTree response.
message SynchronizeTreeResponse { message SynchronizeTreeResponse {
// Response body structure. // Response body structure.
message Body { message Body {}
}
// Body of restore shard response message. // Body of restore shard response message.
Body body = 1; Body body = 1;
@ -262,7 +273,6 @@ message SynchronizeTreeResponse {
Signature signature = 2; Signature signature = 2;
} }
// EvacuateShard request. // EvacuateShard request.
message EvacuateShardRequest { message EvacuateShardRequest {
// Request body structure. // Request body structure.
@ -281,9 +291,7 @@ message EvacuateShardRequest {
// EvacuateShard response. // EvacuateShard response.
message EvacuateShardResponse { message EvacuateShardResponse {
// Response body structure. // Response body structure.
message Body { message Body { uint32 count = 1; }
uint32 count = 1;
}
Body body = 1; Body body = 1;
Signature signature = 2; Signature signature = 2;
@ -295,7 +303,8 @@ message FlushCacheRequest {
message Body { message Body {
// ID of the shard. // ID of the shard.
repeated bytes shard_ID = 1; 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; bool seal = 2;
} }
@ -306,14 +315,12 @@ message FlushCacheRequest {
// FlushCache response. // FlushCache response.
message FlushCacheResponse { message FlushCacheResponse {
// Response body structure. // Response body structure.
message Body { message Body {}
}
Body body = 1; Body body = 1;
Signature signature = 2; Signature signature = 2;
} }
// Doctor request. // Doctor request.
message DoctorRequest { message DoctorRequest {
// Request body structure. // Request body structure.
@ -331,8 +338,7 @@ message DoctorRequest {
// Doctor response. // Doctor response.
message DoctorResponse { message DoctorResponse {
// Response body structure. // Response body structure.
message Body { message Body {}
}
Body body = 1; Body body = 1;
Signature signature = 2; Signature signature = 2;
@ -390,16 +396,13 @@ message GetShardEvacuationStatusResponse {
} }
// Unix timestamp value. // Unix timestamp value.
message UnixTimestamp { message UnixTimestamp { int64 value = 1; }
int64 value = 1;
}
// Duration in seconds. // Duration in seconds.
message Duration { message Duration { int64 seconds = 1; }
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; uint64 total_objects = 1;
// Evacuated objects count. // Evacuated objects count.
uint64 evacuated_objects = 2; uint64 evacuated_objects = 2;
@ -587,8 +590,7 @@ message RemoveChainLocalOverrideRequest {
} }
message RemoveChainLocalOverrideResponse { message RemoveChainLocalOverrideResponse {
message Body { message Body {}
}
Body body = 1; Body body = 1;
@ -607,8 +609,7 @@ message RemoveChainLocalOverridesByTargetRequest {
} }
message RemoveChainLocalOverridesByTargetResponse { message RemoveChainLocalOverridesByTargetResponse {
message Body { message Body {}
}
Body body = 1; Body body = 1;
@ -645,17 +646,14 @@ message SealWriteCacheResponse {
} }
message DetachShardsRequest { message DetachShardsRequest {
message Body { message Body { repeated bytes shard_ID = 1; }
repeated bytes shard_ID = 1;
}
Body body = 1; Body body = 1;
Signature signature = 2; Signature signature = 2;
} }
message DetachShardsResponse { message DetachShardsResponse {
message Body { message Body {}
}
Body body = 1; 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. // Signature of some message.
message Signature { message Signature {
// Public key used for signing. // Public key used for signing.
bytes key = 1 [json_name = "key"]; bytes key = 1 [ json_name = "key" ];
// Binary signature. // Binary signature.
bytes sign = 2 [json_name = "signature"]; bytes sign = 2 [ json_name = "signature" ];
} }
// Status of the storage node in the FrostFS network map. // Status of the storage node in the FrostFS network map.
@ -31,10 +31,10 @@ enum NetmapStatus {
// FrostFS node description. // FrostFS node description.
message NodeInfo { message NodeInfo {
// Public key of the FrostFS node in a binary format. // 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. // 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. // Administrator-defined Attributes of the FrostFS Storage Node.
// //
@ -74,32 +74,32 @@ message NodeInfo {
// corresponding section in FrostFS Technical specification. // corresponding section in FrostFS Technical specification.
message Attribute { message Attribute {
// Key of the node attribute. // Key of the node attribute.
string key = 1 [json_name = "key"]; string key = 1 [ json_name = "key" ];
// Value of the node attribute. // 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 // Parent keys, if any. For example for `City` it could be `Region` and
// `Country`. // `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 // 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 // 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 // structures with duplicated attribute names or attributes with empty values
// will be considered invalid. // will be considered invalid.
repeated Attribute attributes = 3 [json_name = "attributes"]; repeated Attribute attributes = 3 [ json_name = "attributes" ];
// Carries state of the FrostFS node. // Carries state of the FrostFS node.
NetmapStatus state = 4 [json_name = "state"]; NetmapStatus state = 4 [ json_name = "state" ];
} }
// Network map structure. // Network map structure.
message Netmap { message Netmap {
// Network map revision number. // Network map revision number.
uint64 epoch = 1 [json_name = "epoch"]; uint64 epoch = 1 [ json_name = "epoch" ];
// Nodes presented in network. // 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. // Health status of the storage node application.
@ -123,16 +123,16 @@ enum HealthStatus {
// Shard description. // Shard description.
message ShardInfo { message ShardInfo {
// ID of the shard. // ID of the shard.
bytes shard_ID = 1 [json_name = "shardID"]; bytes shard_ID = 1 [ json_name = "shardID" ];
// Path to shard's metabase. // Path to shard's metabase.
string metabase_path = 2 [json_name = "metabasePath"]; string metabase_path = 2 [ json_name = "metabasePath" ];
// Shard's blobstor info. // 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. // 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. // Work mode of the shard.
ShardMode mode = 5; ShardMode mode = 5;
@ -141,15 +141,15 @@ message ShardInfo {
uint32 errorCount = 6; uint32 errorCount = 6;
// Path to shard's pilorama storage. // Path to shard's pilorama storage.
string pilorama_path = 7 [json_name = "piloramaPath"]; string pilorama_path = 7 [ json_name = "piloramaPath" ];
} }
// Blobstor component description. // Blobstor component description.
message BlobstorInfo { message BlobstorInfo {
// Path to the root. // Path to the root.
string path = 1 [json_name = "path"]; string path = 1 [ json_name = "path" ];
// Component type. // Component type.
string type = 2 [json_name = "type"]; string type = 2 [ json_name = "type" ];
} }
// Work mode of the shard. // Work mode of the shard.
@ -170,7 +170,6 @@ enum ShardMode {
DEGRADED_READ_ONLY = 4; DEGRADED_READ_ONLY = 4;
} }
// ChainTarget is an object to which local overrides // ChainTarget is an object to which local overrides
// are applied. // are applied.
message ChainTarget { message ChainTarget {