From 28777911fbc881156aaae1c60fc478cb436ba3c3 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 14 Jan 2021 19:06:49 +0300 Subject: [PATCH] [#311] services/control: Define NetmapSnapshot rpc Add NetmapSnapshot rpc to ControlService protobuf definition. Recompile proto files. Add required method to server structure. Signed-off-by: Leonard Lyubich --- .../control/server/netmap_snapshot.go | 12 ++++++ pkg/services/control/service.go | 35 ++++++++++++++++++ pkg/services/control/service.pb.go | Bin 26570 -> 47957 bytes pkg/services/control/service.proto | 31 ++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 pkg/services/control/server/netmap_snapshot.go diff --git a/pkg/services/control/server/netmap_snapshot.go b/pkg/services/control/server/netmap_snapshot.go new file mode 100644 index 0000000000..6643da14a4 --- /dev/null +++ b/pkg/services/control/server/netmap_snapshot.go @@ -0,0 +1,12 @@ +package control + +import ( + "context" + + "github.com/nspcc-dev/neofs-node/pkg/services/control" +) + +// NetmapSnapshot reads network map snapshot from Netmap storage. +func (s *Server) NetmapSnapshot(ctx context.Context, req *control.NetmapSnapshotRequest) (*control.NetmapSnapshotResponse, error) { + panic("implement me") +} diff --git a/pkg/services/control/service.go b/pkg/services/control/service.go index 874acfe487..4cde4be0d4 100644 --- a/pkg/services/control/service.go +++ b/pkg/services/control/service.go @@ -58,3 +58,38 @@ func (m *HealthCheckResponse) ReadSignedData(buf []byte) ([]byte, error) { func (m *HealthCheckResponse) SignedDataSize() int { return m.GetBody().Size() } + +// SetBody sets get netmap snapshot request body. +func (m *NetmapSnapshotRequest) SetBody(v *NetmapSnapshotRequest_Body) { + if m != nil { + m.Body = v + } +} + +// SetSignature sets signature of the netmap snapshot request body. +func (m *NetmapSnapshotRequest) SetSignature(body *Signature) { + if m != nil { + m.Signature = body + } +} + +// SetNetmap sets structure of the current network map. +func (m *NetmapSnapshotResponse_Body) SetNetmap(v *Netmap) { + if m != nil { + m.Netmap = v + } +} + +// SetBody sets get netmap snapshot response body. +func (m *NetmapSnapshotResponse) SetBody(v *NetmapSnapshotResponse_Body) { + if m != nil { + m.Body = v + } +} + +// SetSignature sets signature of the get netmap snapshot response body. +func (m *NetmapSnapshotResponse) SetSignature(v *Signature) { + if m != nil { + m.Signature = v + } +} diff --git a/pkg/services/control/service.pb.go b/pkg/services/control/service.pb.go index f5810bea928db0c8f84c3d4358f8e708a8165ab8..2186fc1e31dba4c106234a1f96794ec90ceacebf 100644 GIT binary patch delta 5700 zcmb_gO>i4$86K%|Y^naK^JBZV?5quGq(rgzN7|L-I6oAcX%f;TrVNY;X0^MDO=8KF z9w$$7kcv6N|V_(hosI^iQ zNSzCQH}=EHjvlNA?Eb5dJZg5|?peXR@wS|gJbbiE1xF^HKBT7=wO0{;_3$M*?(xCr zWYO)xAIqYrhEB?&?+!gCi+($_D2qmh+v<9$UG$ydW4Rv5@0j;1UTw2du6h37qhtF! z95{b)WK!~`rHx!|J6yLPnJvimA#$(U+-LvWo>OC;&HdATGm-=T`skMuMz0F}dGvy8 zqwTB7qMz>jku0+J7i7`v`{%m3_Jhdt1s(MPLq}12E?SbvN!6<*OQoXK- zc`ha}3pcLp{uhp9#XmVRJtYi;ZhEs?saK3Sb*`7slI~;Sb}-s`mxKR}iOaIty@`e_T7C2lSu{3zN)~->@<_Kv zd4DJ)Ykx3l$)c&LHqq57y={uK{wObcidlRx&HcBhro&knkKKyLs$PAoT2{*IH(Eo9 zV#I$ZF(xygPE3r;#lTfQm-1&45UbO7qK4&<&a5?UM-;V@4NBW^v|!D6cn+p~BcrC{F}0zo!5>yOSXDPz z?K~tjz_S6JES__K)3NKqDw}~7$aE97cCa>W4GadcbAil-ok0xP2!bM1bv%0kO|#)KTv+R+z`6uG9Y_W|E&)%)t_J-Qm{odb zFa&Iy$eRf>4G={tA+!>hbvhR8HXC^`8&LHCQ3SSy)qukypFtTi6u|+Hse-WzP8+Mm zqytC=s0m4lK=8|9dIE%ISWnXeg9`t0&<#@w3j^3i@&Jz*7Lc-#ux||bmBY%&P3X8D z2z1miL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