forked from TrueCloudLab/frostfs-api
[#127] netmap: Define NetworkInfo rpc in NetmapService
Define `NetworkInfo` rpc which can be used to read the recent NeoFS network information. Request body is empty, response body contains NetworkInfo message. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3a2e01741a
commit
1affb7e458
1 changed files with 39 additions and 0 deletions
|
@ -20,6 +20,9 @@ service NetmapService {
|
||||||
// present in `Network Map` to find out what API version can be used for
|
// present in `Network Map` to find out what API version can be used for
|
||||||
// further communication. Can also be used to check if node is up and running.
|
// further communication. Can also be used to check if node is up and running.
|
||||||
rpc LocalNodeInfo (LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
|
rpc LocalNodeInfo (LocalNodeInfoRequest) returns (LocalNodeInfoResponse);
|
||||||
|
|
||||||
|
// Read recent information about the NeoFS network.
|
||||||
|
rpc NetworkInfo (NetworkInfoRequest) returns (NetworkInfoResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get NodeInfo structure from the particular node directly
|
// Get NodeInfo structure from the particular node directly
|
||||||
|
@ -62,3 +65,39 @@ message LocalNodeInfoResponse {
|
||||||
// transmission.
|
// transmission.
|
||||||
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
neo.fs.v2.session.ResponseVerificationHeader verify_header = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message NetworkInfoRequest {
|
||||||
|
// NetworkInfo request body is empty.
|
||||||
|
message Body {
|
||||||
|
}
|
||||||
|
// Body of the NetworkInfo 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
message NetworkInfoResponse {
|
||||||
|
// Information about the network.
|
||||||
|
message Body {
|
||||||
|
// NetworkInfo structure with recent information.
|
||||||
|
NetworkInfo network_info = 1;
|
||||||
|
}
|
||||||
|
// Body of the NetworkInfo 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;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue