From 85ec6339384c76057ef141cf433d12d41e313fa8 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 13 Jan 2021 15:47:54 +0300 Subject: [PATCH] [#306] Define and compile proto files for private node service Signed-off-by: Leonard Lyubich --- Makefile | 2 +- go.mod | 1 + go.sum | Bin 58974 -> 59054 bytes pkg/services/private/service.pb.go | Bin 0 -> 26570 bytes pkg/services/private/service.proto | 41 +++++++++++++++++++++++++++++ pkg/services/private/types.pb.go | Bin 0 -> 10732 bytes pkg/services/private/types.proto | 26 ++++++++++++++++++ 7 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 pkg/services/private/service.pb.go create mode 100644 pkg/services/private/service.proto create mode 100644 pkg/services/private/types.pb.go create mode 100644 pkg/services/private/types.proto diff --git a/Makefile b/Makefile index 6fff585c6..b0b295637 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ protoc: @for f in `find . -type f -name '*.proto' -not -path './vendor/*'`; do \ echo "⇒ Processing $$f "; \ protoc \ - --proto_path=.:./vendor:./vendor/github.com/nspcc-dev/neofs-api-go:/usr/local/include \ + --proto_path=.:./vendor:./vendor/github.com/nspcc-dev/neofs-api-go:/usr/local/include:./pkg/services/private \ --gofast_out=plugins=grpc,paths=source_relative:. $$f; \ done rm -rf vendor diff --git a/go.mod b/go.mod index f0501e418..8a3223713 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.14 require ( code.cloudfoundry.org/bytefmt v0.0.0-20200131002437-cf55d5288a48 github.com/alecthomas/participle v0.6.0 + github.com/golang/protobuf v1.4.3 github.com/google/uuid v1.1.1 github.com/hashicorp/golang-lru v0.5.4 github.com/klauspost/compress v1.11.3 diff --git a/go.sum b/go.sum index 29b9824fb7f80df6398dd6dcd2a7894796412aa8..402a5840d75415bb4f92ec1b6417cc59f86f90a7 100644 GIT binary patch delta 62 zcmcb2hI!pt<_)v-^%XJ7TNaZ5 delta 14 WcmZ2?migWp<_)v-H^0(9vJC(_eh2FS diff --git a/pkg/services/private/service.pb.go b/pkg/services/private/service.pb.go new file mode 100644 index 0000000000000000000000000000000000000000..3c12c3fb7ba13921aa61cba13c05b90f3e3835e7 GIT binary patch literal 26570 zcmeHQdvn{y5&xU~6jycPA!C{%Dav}(?u_e4qnXC`#CDn)kE(#ckwQ%ZEC9+gAl)ksG=@iHB#!IhdOaTfdcaPQtI9>s0- z<0Mm!dd-icOkZYd$6V~xYr_e?;scjFU+s*-?0hz8`|)IV6py`V1VkWjFdNDR zMvjuHkAZPK8tb+UYRAcFm+s?n7^|Hy#>K?T&eaZm?$n!gV&o@1)QOIKt%RynWwA(F+ZITCwG`g|#7a+3b6 zlN88%ihzx^M`E6i5)VeYzz_@Y2kni)t$(ilcPi2UnQ3AsyP9exj~>&LpX7l`vt;IH z>O;K-_<6++~0z2aezgl}d-WgnFI&F1Z@ic2i-b6nf06~kN z@9n66r*VWabSs{OnVw9utDRp9Leg*)c^MQ9l&|cya{l|ixVwO~S0K&dlrR_f=g|N1 z%P(io<2TVeeWincfUd+F8!>(O2<*QK-S>!88as;;?Z=}i{0-59{(E~$eDh^_Y>Gj? z2i5RXe1uW9*OM>K*pK!4a2ENhF;Nv_Zo*Adoi&;ki29(upTOZ3H3EV^t_JlgOJMzg z1w$Y=_yCiE%p)<}_G9uPKYNX^WJXS!Imk-d*m{2yTM-gJSQ0A7Khde5gwrfeFuEbK zYe9yPOq0ygkVAf53_Uy8>-a;D{_Xd5pbyQA51o&7i*1SQNM&!LiA1Hwz-X&!oV!3c zX*;8u>p(S;E{EAtfrj-=!YE9$&{u;v9y=^@G+`DIQ0GU23d{H9<>i_2JVeO&Y*EKH z!ZrpiH7Vh2)@vV?9wTND$N_9*@b=jErj0@K6gQ$4v8|3Ds)>d2I>s|R0!{SjPY+cT zj(N7F2;X@c27SaoqaVPHPFpk>DA$sfPDZ+sCcd#WV=^p|b(rSq;1>|q(#|Wm9xM!I z>iBmrd}jR|l5g~YTJQ$DH!9rBSF`+O>c z8wFQO^O-P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t*-_AaHUZ$ RR-~TmR3+wa2kgD}zW`XpK92wZ literal 0 HcmV?d00001 diff --git a/pkg/services/private/types.proto b/pkg/services/private/types.proto new file mode 100644 index 000000000..f473bb7ce --- /dev/null +++ b/pkg/services/private/types.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package private; + +option go_package = "github.com/nspcc-dev/neofs-node/pkg/services/private"; + +// Signature of some message. +message Signature { + // Public key used for signing. + bytes key = 1 [json_name = "key"]; + + // Binary signature. + bytes sign = 2 [json_name = "signature"]; +} + +// Health status of the storage node. +enum HealthStatus { + // Undefined status, default value. + STATUS_UNDEFINED = 0; + + // Node is online. + ONLINE = 1; + + // Node is offline. + OFFLINE = 2; +}