[#34] bootstrap: Tidy up the format

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-08-05 22:44:53 +03:00 committed by Stanislav Bogatyrev
parent 50d4fcb24a
commit 87e1d01307
2 changed files with 25 additions and 13 deletions

View file

@ -1,21 +1,33 @@
syntax = "proto3"; syntax = "proto3";
package bootstrap; package bootstrap;
option go_package = "github.com/nspcc-dev/neofs-api-go/bootstrap"; option go_package = "github.com/nspcc-dev/neofs-api-go/bootstrap";
option csharp_namespace = "NeoFS.API.Bootstrap"; option csharp_namespace = "NeoFS.API.Bootstrap";
// Groups the information about the NeoFS node.
message NodeInfo { message NodeInfo {
// Address is a node [multi-address](https://github.com/multiformats/multiaddr) // Carries network address of the NeoFS node.
string Address = 1; string Address = 1;
// PubKey is a compressed public key representation in bytes
bytes PubKey = 2; // Carries public key of the NeoFS node in a binary format.
// Options is set of node optional information, such as storage capacity, node location, price and etc bytes PublicKey = 2;
// Carries options of the NeoFS node.
repeated string Options = 3; repeated string Options = 3;
// Represents the enumeration of various states of the NeoFS node.
enum State { enum State {
// Undefined state.
Unknown = 0; Unknown = 0;
// Active state on the network.
Online = 1; Online = 1;
// Network unavailable state.
Offline = 2; Offline = 2;
} }
// Carries state of the NeoFS node.
State state = 4; State state = 4;
} }

View file

@ -25,15 +25,15 @@
<a name="bootstrap.NodeInfo"></a> <a name="bootstrap.NodeInfo"></a>
### Message NodeInfo ### Message NodeInfo
Groups the information about the NeoFS node.
| Field | Type | Label | Description | | Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- | | ----- | ---- | ----- | ----------- |
| Address | [string](#string) | | Address is a node [multi-address](https://github.com/multiformats/multiaddr) | | Address | [string](#string) | | Carries network address of the NeoFS node. |
| PubKey | [bytes](#bytes) | | PubKey is a compressed public key representation in bytes | | PublicKey | [bytes](#bytes) | | Carries public key of the NeoFS node in a binary format. |
| Options | [string](#string) | repeated | Options is set of node optional information, such as storage capacity, node location, price and etc | | Options | [string](#string) | repeated | Carries options of the NeoFS node. |
| state | [NodeInfo.State](#bootstrap.NodeInfo.State) | | | | state | [NodeInfo.State](#bootstrap.NodeInfo.State) | | Carries state of the NeoFS node. |
<!-- end messages --> <!-- end messages -->
@ -41,13 +41,13 @@
<a name="bootstrap.NodeInfo.State"></a> <a name="bootstrap.NodeInfo.State"></a>
### NodeInfo.State ### NodeInfo.State
Represents the enumeration of various states of the NeoFS node.
| Name | Number | Description | | Name | Number | Description |
| ---- | ------ | ----------- | | ---- | ------ | ----------- |
| Unknown | 0 | | | Unknown | 0 | Undefined state. |
| Online | 1 | | | Online | 1 | Active state on the network. |
| Offline | 2 | | | Offline | 2 | Network unavailable state. |
<!-- end enums --> <!-- end enums -->