diff --git a/docs/state.md b/docs/state.md index e678be32..79504554 100644 --- a/docs/state.md +++ b/docs/state.md @@ -8,6 +8,8 @@ - [Status](#state.Status) - Messages + - [DumpRequest](#state.DumpRequest) + - [DumpResponse](#state.DumpResponse) - [HealthRequest](#state.HealthRequest) - [HealthResponse](#state.HealthResponse) - [MetricsRequest](#state.MetricsRequest) @@ -36,6 +38,7 @@ Status service provides node's healthcheck and status info rpc Netmap(NetmapRequest) returns (.bootstrap.SpreadMap); rpc Metrics(MetricsRequest) returns (MetricsResponse); 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 | | ---- | ----- | ------ | | 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) | + + +### 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) | + + + + +### Message DumpResponse +DumpResponse message contains current server config. +Config stored in JSON encoded into slice of bytes. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| Config | [bytes](#bytes) | | | + + ### Message HealthRequest diff --git a/state/service.pb.go b/state/service.pb.go index 520c8ce6..09cc645e 100644 Binary files a/state/service.pb.go and b/state/service.pb.go differ diff --git a/state/service.proto b/state/service.proto index ed90e269..a30af225 100644 --- a/state/service.proto +++ b/state/service.proto @@ -18,6 +18,10 @@ service Status { // HealthCheck request allows to check health status of the node. // If node unhealthy field Status would contains detailed info. 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 @@ -58,3 +62,17 @@ message HealthResponse { // Status contains detailed information about health status 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; +}