Merge pull request #6 from nspcc-dev/bootstrap_node_state

Bootstrap node state
This commit is contained in:
Evgeniy Kulikov 2020-04-15 14:33:47 +03:00 committed by GitHub
commit 96aeb5e1e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View file

@ -19,10 +19,22 @@ service Bootstrap {
}
message Request {
// Node state
enum State {
// used by default
Unknown = 0;
// used to inform that node online
Online = 1;
// used to inform that node offline
Offline = 2;
}
// Type is NodeType, can be InnerRingNode (type=1) or StorageNode (type=2)
int32 type = 1 [(gogoproto.customname) = "Type" , (gogoproto.nullable) = false, (gogoproto.customtype) = "NodeType"];
// Info contains information about node
bootstrap.NodeInfo info = 2 [(gogoproto.nullable) = false];
// State contains node status
State state = 3;
// RequestMetaHeader contains information about request meta headers (should be embedded into message)
service.RequestMetaHeader Meta = 98 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
// RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message)

View file

@ -62,11 +62,25 @@ Process is method that allows to register node in the network and receive actual
| ----- | ---- | ----- | ----------- |
| type | [int32](#int32) | | Type is NodeType, can be InnerRingNode (type=1) or StorageNode (type=2) |
| info | [NodeInfo](#bootstrap.NodeInfo) | | Info contains information about node |
| state | [Request.State](#bootstrap.Request.State) | | State contains node status |
| Meta | [service.RequestMetaHeader](#service.RequestMetaHeader) | | RequestMetaHeader contains information about request meta headers (should be embedded into message) |
| Verify | [service.RequestVerificationHeader](#service.RequestVerificationHeader) | | RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) |
<!-- end messages -->
<a name="bootstrap.Request.State"></a>
### Request.State
Node state
| Name | Number | Description |
| ---- | ------ | ----------- |
| Unknown | 0 | used by default |
| Online | 1 | used to inform that node online |
| Offline | 2 | used to inform that node offline |
<!-- end enums -->