[#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

File diff suppressed because it is too large Load diff

View file

@ -6,183 +6,182 @@ 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.
enum NetmapStatus { enum NetmapStatus {
// Undefined status, default value. // Undefined status, default value.
STATUS_UNDEFINED = 0; STATUS_UNDEFINED = 0;
// Node is online. // Node is online.
ONLINE = 1; ONLINE = 1;
// Node is offline. // Node is offline.
OFFLINE = 2; OFFLINE = 2;
// Node is maintained by the owner. // Node is maintained by the owner.
MAINTENANCE = 3; MAINTENANCE = 3;
} }
// 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.
// //
// `Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8 // `Attribute` is a Key-Value metadata pair. Key name must be a valid UTF-8
// string. Value can't be empty. // string. Value can't be empty.
// //
// Node's attributes are mostly used during Storage Policy evaluation to // Node's attributes are mostly used during Storage Policy evaluation to
// calculate object's placement and find a set of nodes satisfying policy // calculate object's placement and find a set of nodes satisfying policy
// requirements. There are some "well-known" node attributes common to all the // requirements. There are some "well-known" node attributes common to all the
// Storage Nodes in the network and used implicitly with default values if not // Storage Nodes in the network and used implicitly with default values if not
// explicitly set: // explicitly set:
// //
// * Capacity \ // * Capacity \
// Total available disk space in Gigabytes. // Total available disk space in Gigabytes.
// * Price \ // * Price \
// Price in GAS tokens for storing one GB of data during one Epoch. In node // Price in GAS tokens for storing one GB of data during one Epoch. In node
// attributes it's a string presenting floating point number with comma or // attributes it's a string presenting floating point number with comma or
// point delimiter for decimal part. In the Network Map it will be saved as // point delimiter for decimal part. In the Network Map it will be saved as
// 64-bit unsigned integer representing number of minimal token fractions. // 64-bit unsigned integer representing number of minimal token fractions.
// * Locode \ // * Locode \
// Node's geographic location in // Node's geographic location in
// [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html) // [UN/LOCODE](https://www.unece.org/cefact/codesfortrade/codes_index.html)
// format approximated to the nearest point defined in standard. // format approximated to the nearest point defined in standard.
// * Country \ // * Country \
// Country code in // Country code in
// [ISO 3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) // [ISO 3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
// format. Calculated automatically from `Locode` attribute // format. Calculated automatically from `Locode` attribute
// * Region \ // * Region \
// Country's administative subdivision where node is located. Calculated // Country's administative subdivision where node is located. Calculated
// automatically from `Locode` attribute based on `SubDiv` field. Presented // automatically from `Locode` attribute based on `SubDiv` field. Presented
// in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. // in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
// * City \ // * City \
// City, town, village or rural area name where node is located written // City, town, village or rural area name where node is located written
// without diacritics . Calculated automatically from `Locode` attribute. // without diacritics . Calculated automatically from `Locode` attribute.
// //
// For detailed description of each well-known attribute please see the // For detailed description of each well-known attribute please see the
// 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.
enum HealthStatus { enum HealthStatus {
// Undefined status, default value. // Undefined status, default value.
HEALTH_STATUS_UNDEFINED = 0; HEALTH_STATUS_UNDEFINED = 0;
// Storage node application is starting. // Storage node application is starting.
STARTING = 1; STARTING = 1;
// Storage node application is started and serves all services. // Storage node application is started and serves all services.
READY = 2; READY = 2;
// Storage node application is shutting down. // Storage node application is shutting down.
SHUTTING_DOWN = 3; SHUTTING_DOWN = 3;
// Storage node application is reconfiguring. // Storage node application is reconfiguring.
RECONFIGURING = 4; RECONFIGURING = 4;
} }
// 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;
// Amount of errors occured. // Amount of errors occured.
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.
enum ShardMode { enum ShardMode {
// Undefined mode, default value. // Undefined mode, default value.
SHARD_MODE_UNDEFINED = 0; SHARD_MODE_UNDEFINED = 0;
// Read-write. // Read-write.
READ_WRITE = 1; READ_WRITE = 1;
// Read-only. // Read-only.
READ_ONLY = 2; READ_ONLY = 2;
// Degraded. // Degraded.
DEGRADED = 3; DEGRADED = 3;
// DegradedReadOnly. // DegradedReadOnly.
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 {
enum TargetType { enum TargetType {
UNDEFINED = 0; UNDEFINED = 0;
NAMESPACE = 1; NAMESPACE = 1;
CONTAINER = 2; CONTAINER = 2;
} }
TargetType type = 1; TargetType type = 1;
string Name = 2; string Name = 2;
} }