[#59] netmap: Add LocalNodeInfo request
This should be used as a handshake to know API Version supported by peer and to update local netmap view in future. Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
b169954806
commit
eab2210ffe
2 changed files with 146 additions and 0 deletions
57
netmap/service.proto
Normal file
57
netmap/service.proto
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package neo.fs.v2.netmap;
|
||||||
|
|
||||||
|
option go_package = "github.com/nspcc-dev/neofs-api-go/v2/netmap/grpc;netmap";
|
||||||
|
option csharp_namespace = "NeoFS.API.v2.Netmap";
|
||||||
|
|
||||||
|
import "netmap/types.proto";
|
||||||
|
import "refs/types.proto";
|
||||||
|
import "session/types.proto";
|
||||||
|
|
||||||
|
// Methods to work with NetworkMap
|
||||||
|
service NetmapService {
|
||||||
|
// Return information about Node
|
||||||
|
rpc LocalNodeInfo (LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get NodeInfo from the particular node directly
|
||||||
|
message LocalNodeInfoRequest {
|
||||||
|
//Request body
|
||||||
|
message Body {
|
||||||
|
}
|
||||||
|
// Body of the balance request message.
|
||||||
|
Body body = 1;
|
||||||
|
|
||||||
|
// Carries request meta information. Header data is used only to regulate
|
||||||
|
// message transport and does not affect request execution.
|
||||||
|
neo.fs.v2.session.RequestMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries request verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
neo.fs.v2.session.RequestVerificationHeader verify_header = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Local nod Info, including API Version in use
|
||||||
|
message LocalNodeInfoResponse {
|
||||||
|
//Response body
|
||||||
|
message Body {
|
||||||
|
// API version in use
|
||||||
|
neo.fs.v2.refs.Version version = 1;
|
||||||
|
|
||||||
|
// NodeInfo from node itself
|
||||||
|
NodeInfo node_info = 2;
|
||||||
|
}
|
||||||
|
// Body of the balance response message.
|
||||||
|
Body body = 1;
|
||||||
|
|
||||||
|
// Carries response meta information. Header data is used only to regulate
|
||||||
|
// message transport and does not affect response execution.
|
||||||
|
neo.fs.v2.session.ResponseMetaHeader meta_header = 2;
|
||||||
|
|
||||||
|
// Carries response verification information. This header is used to
|
||||||
|
// authenticate the nodes of the message route and check the correctness
|
||||||
|
// of transmission.
|
||||||
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
||||||
|
}
|
|
@ -3,6 +3,17 @@
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
|
- [netmap/service.proto](#netmap/service.proto)
|
||||||
|
- Services
|
||||||
|
- [NetmapService](#neo.fs.v2.netmap.NetmapService)
|
||||||
|
|
||||||
|
- Messages
|
||||||
|
- [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest)
|
||||||
|
- [LocalNodeInfoRequest.Body](#neo.fs.v2.netmap.LocalNodeInfoRequest.Body)
|
||||||
|
- [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse)
|
||||||
|
- [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body)
|
||||||
|
|
||||||
|
|
||||||
- [netmap/types.proto](#netmap/types.proto)
|
- [netmap/types.proto](#netmap/types.proto)
|
||||||
|
|
||||||
- Messages
|
- Messages
|
||||||
|
@ -18,6 +29,84 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="netmap/service.proto"></a>
|
||||||
|
<p align="right"><a href="#top">Top</a></p>
|
||||||
|
|
||||||
|
## netmap/service.proto
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="neo.fs.v2.netmap.NetmapService"></a>
|
||||||
|
|
||||||
|
### Service "neo.fs.v2.netmap.NetmapService"
|
||||||
|
Methods to work with NetworkMap
|
||||||
|
|
||||||
|
```
|
||||||
|
rpc LocalNodeInfo(LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Method LocalNodeInfo
|
||||||
|
|
||||||
|
Return information about Node
|
||||||
|
|
||||||
|
| Name | Input | Output |
|
||||||
|
| ---- | ----- | ------ |
|
||||||
|
| LocalNodeInfo | [LocalNodeInfoRequest](#neo.fs.v2.netmap.LocalNodeInfoRequest) | [LocalNodeInfoResponse](#neo.fs.v2.netmap.LocalNodeInfoResponse) |
|
||||||
|
<!-- end services -->
|
||||||
|
|
||||||
|
|
||||||
|
<a name="neo.fs.v2.netmap.LocalNodeInfoRequest"></a>
|
||||||
|
|
||||||
|
### Message LocalNodeInfoRequest
|
||||||
|
Get NodeInfo from the particular node directly
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| body | [LocalNodeInfoRequest.Body](#neo.fs.v2.netmap.LocalNodeInfoRequest.Body) | | Body of the balance request message. |
|
||||||
|
| meta_header | [neo.fs.v2.session.RequestMetaHeader](#neo.fs.v2.session.RequestMetaHeader) | | Carries request meta information. Header data is used only to regulate message transport and does not affect request execution. |
|
||||||
|
| verify_header | [neo.fs.v2.session.RequestVerificationHeader](#neo.fs.v2.session.RequestVerificationHeader) | | Carries request verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
|
||||||
|
|
||||||
|
|
||||||
|
<a name="neo.fs.v2.netmap.LocalNodeInfoRequest.Body"></a>
|
||||||
|
|
||||||
|
### Message LocalNodeInfoRequest.Body
|
||||||
|
Request body
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="neo.fs.v2.netmap.LocalNodeInfoResponse"></a>
|
||||||
|
|
||||||
|
### Message LocalNodeInfoResponse
|
||||||
|
Local nod Info, including API Version in use
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| body | [LocalNodeInfoResponse.Body](#neo.fs.v2.netmap.LocalNodeInfoResponse.Body) | | Body of the balance response message. |
|
||||||
|
| meta_header | [neo.fs.v2.session.ResponseMetaHeader](#neo.fs.v2.session.ResponseMetaHeader) | | Carries response meta information. Header data is used only to regulate message transport and does not affect response execution. |
|
||||||
|
| verify_header | [neo.fs.v2.session.ResponseVerificationHeader](#neo.fs.v2.session.ResponseVerificationHeader) | | Carries response verification information. This header is used to authenticate the nodes of the message route and check the correctness of transmission. |
|
||||||
|
|
||||||
|
|
||||||
|
<a name="neo.fs.v2.netmap.LocalNodeInfoResponse.Body"></a>
|
||||||
|
|
||||||
|
### Message LocalNodeInfoResponse.Body
|
||||||
|
Response body
|
||||||
|
|
||||||
|
|
||||||
|
| Field | Type | Label | Description |
|
||||||
|
| ----- | ---- | ----- | ----------- |
|
||||||
|
| version | [neo.fs.v2.refs.Version](#neo.fs.v2.refs.Version) | | API version in use |
|
||||||
|
| node_info | [NodeInfo](#neo.fs.v2.netmap.NodeInfo) | | NodeInfo from node itself |
|
||||||
|
|
||||||
|
<!-- end messages -->
|
||||||
|
|
||||||
|
<!-- end enums -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="netmap/types.proto"></a>
|
<a name="netmap/types.proto"></a>
|
||||||
<p align="right"><a href="#top">Top</a></p>
|
<p align="right"><a href="#top">Top</a></p>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue