state: add request to dump node config

- regenerate proto files
- regenerate proto docs
This commit is contained in:
Evgeniy Kulikov 2019-12-17 14:08:59 +03:00
parent 3e30d3bb16
commit 11eb541f23
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2
3 changed files with 54 additions and 0 deletions

View file

@ -8,6 +8,8 @@
- [Status](#state.Status) - [Status](#state.Status)
- Messages - Messages
- [DumpRequest](#state.DumpRequest)
- [DumpResponse](#state.DumpResponse)
- [HealthRequest](#state.HealthRequest) - [HealthRequest](#state.HealthRequest)
- [HealthResponse](#state.HealthResponse) - [HealthResponse](#state.HealthResponse)
- [MetricsRequest](#state.MetricsRequest) - [MetricsRequest](#state.MetricsRequest)
@ -36,6 +38,7 @@ Status service provides node's healthcheck and status info
rpc Netmap(NetmapRequest) returns (.bootstrap.SpreadMap); rpc Netmap(NetmapRequest) returns (.bootstrap.SpreadMap);
rpc Metrics(MetricsRequest) returns (MetricsResponse); rpc Metrics(MetricsRequest) returns (MetricsResponse);
rpc HealthCheck(HealthRequest) returns (HealthResponse); rpc HealthCheck(HealthRequest) returns (HealthResponse);
rpc DumpConfig(DumpRequest) returns (DumpResponse);
``` ```
@ -61,9 +64,42 @@ If node unhealthy field Status would contains detailed info.
| Name | Input | Output | | Name | Input | Output |
| ---- | ----- | ------ | | ---- | ----- | ------ |
| HealthCheck | [HealthRequest](#state.HealthRequest) | [HealthResponse](#state.HealthResponse) | | HealthCheck | [HealthRequest](#state.HealthRequest) | [HealthResponse](#state.HealthResponse) |
#### Method DumpConfig
DumpConfig request allows dumping settings for the current node.
To permit access, used server config options.
The request should be signed.
| Name | Input | Output |
| ---- | ----- | ------ |
| DumpConfig | [DumpRequest](#state.DumpRequest) | [DumpResponse](#state.DumpResponse) |
<!-- end services --> <!-- end services -->
<a name="state.DumpRequest"></a>
### Message DumpRequest
DumpRequest message to fetch current server config.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| 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) |
<a name="state.DumpResponse"></a>
### Message DumpResponse
DumpResponse message contains current server config.
Config stored in JSON encoded into slice of bytes.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| Config | [bytes](#bytes) | | |
<a name="state.HealthRequest"></a> <a name="state.HealthRequest"></a>
### Message HealthRequest ### Message HealthRequest

Binary file not shown.

View file

@ -18,6 +18,10 @@ service Status {
// HealthCheck request allows to check health status of the node. // HealthCheck request allows to check health status of the node.
// If node unhealthy field Status would contains detailed info. // If node unhealthy field Status would contains detailed info.
rpc HealthCheck(HealthRequest) returns (HealthResponse); rpc HealthCheck(HealthRequest) returns (HealthResponse);
// DumpConfig request allows dumping settings for the current node.
// To permit access, used server config options.
// The request should be signed.
rpc DumpConfig(DumpRequest) returns (DumpResponse);
} }
// NetmapRequest message to request current node netmap // NetmapRequest message to request current node netmap
@ -58,3 +62,17 @@ message HealthResponse {
// Status contains detailed information about health status // Status contains detailed information about health status
string Status = 2; string Status = 2;
} }
// DumpRequest message to fetch current server config.
message DumpRequest {
// 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)
service.RequestVerificationHeader Verify = 99 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
}
// DumpResponse message contains current server config.
// Config stored in JSON encoded into slice of bytes.
message DumpResponse {
bytes Config = 1;
}