From 11eb541f2305a6266fac26f88164fa863332f216 Mon Sep 17 00:00:00 2001 From: Evgeniy Kulikov Date: Tue, 17 Dec 2019 14:08:59 +0300 Subject: [PATCH] state: add request to dump node config - regenerate proto files - regenerate proto docs --- docs/state.md | 36 ++++++++++++++++++++++++++++++++++++ state/service.pb.go | Bin 38187 -> 50032 bytes state/service.proto | 18 ++++++++++++++++++ 3 files changed, 54 insertions(+) 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 520c8ce62a096ee60474980a3e512a8e2acf5669..09cc645e781b7a06fb8063afc157ca813ddc4dc9 100644 GIT binary patch delta 4418 zcmc&&O^h7X5!S9(#yi0=>z~+b1^ambvl|cV{+sTeg|#rYz_5S?Muy0?O#i&L2hH}3 zr+dt<&8mqa!68wI+y}(LCvG4iM{|gh16;Vlfgf=J1oF*RQ#5`yYGyD_u9HEWA*j>_lv`WrSi(Ut$P!hM`uMe==Wusi%j;<%f5)Z zY0^G3SIbv=Qfu~xUvIlGKB0Hz$sJ;yKK%RjKcnFCjz_tgxxQ&{!LwPf zn`Tlh$t(-bNbPeTwA1WA#iC+9gs?=Gcl$CH?NmH*?C8@%rcpP>@4PFrPCJsKn}~2F zm)Qsd&&mof%YWJ*M7g+Fo20$+yY16%uiwqP;UJl><6y&VbbEOt4VL5rwHnZ{>*A%X zo6gs(qtjDwGQK}f?cwIzsfyNrOg%=)6Px#P^YZ2wHoHHj^{>00~Bs@yq5f(S!Y^^ps_dI|UuLU?O9+NrUo0%0SPU(2ckN4cYjk4P0YHhMF^Fcoq zX}dGLxhEbgzp7VGr)!(v)Wz=6G|kQ^<=KX)XL*pzIn=}PdoGVRTjlrnq=nNE#&VeG z)s=dUL%rHYqc&+Qn}+@oxmazzCQxdcdLKg)Vr}7=VQIM^>D7((YWR9J1FQgxpzqiK zC|n=}SVOD^v;wRaY|sl6k`^Q_AQ)JiEp0o--hp2RRyzQKM{@v`*wbN}E<%V*L`X{s zPP>pt^a%7YX6m~zXC^?f-~dIW$^l7qM#7vAi3jI>=v$zwuz(|*hyg4`P&L4(=K~=D zT;gdZn-5?q!C?<_#?}IwM^Z@%&_)xlNaG#>IH5~?pt0@wh=Kj1i6SysTwt{Y&6qK; zDJVGQDk)~g1PI4t2*8P9i27_+?5kl&e6Ys`K~@tNERhBe2vu)}Rg%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60)@yhxEre6|WPIJLaocjI@d^SO z8e|RTAggoQab$}fhZ0%sCvBUEl7*vDcJp8-#VuQ}ME^BLo}-k^ZN&VNuXk&@EwM(H(J;)#D;CD^ldF4u_v@AY&wCF~ o_sjcVPWNvQUS8inT|PhAUp@MMV_%+qxVCpM{tf%*|K48v0bAXA4FCWD 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; +}