2020-01-30 11:41:24 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package bootstrap;
|
2020-03-31 06:58:22 +00:00
|
|
|
option go_package = "github.com/nspcc-dev/neofs-api-go/bootstrap";
|
2020-02-05 12:14:39 +00:00
|
|
|
option csharp_namespace = "NeoFS.API.Bootstrap";
|
2020-01-30 11:41:24 +00:00
|
|
|
|
|
|
|
import "service/meta.proto";
|
|
|
|
import "service/verify.proto";
|
|
|
|
import "bootstrap/types.proto";
|
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
option (gogoproto.stable_marshaler_all) = true;
|
|
|
|
|
|
|
|
// Bootstrap service allows neofs-node to connect to the network. Node should
|
|
|
|
// perform at least one bootstrap request in the epoch to stay in the network
|
|
|
|
// for the next epoch.
|
|
|
|
service Bootstrap {
|
|
|
|
// Process is method that allows to register node in the network and receive actual netmap
|
|
|
|
rpc Process(Request) returns (bootstrap.SpreadMap);
|
|
|
|
}
|
|
|
|
|
|
|
|
message Request {
|
2020-04-15 09:24:21 +00:00
|
|
|
// Node state
|
|
|
|
enum State {
|
|
|
|
// used by default
|
|
|
|
Unknown = 0;
|
|
|
|
// used to inform that node online
|
|
|
|
Online = 1;
|
|
|
|
// used to inform that node offline
|
|
|
|
Offline = 2;
|
|
|
|
}
|
|
|
|
|
2020-01-30 11:41:24 +00:00
|
|
|
// Type is NodeType, can be InnerRingNode (type=1) or StorageNode (type=2)
|
|
|
|
int32 type = 1 [(gogoproto.customname) = "Type" , (gogoproto.nullable) = false, (gogoproto.customtype) = "NodeType"];
|
|
|
|
// Info contains information about node
|
|
|
|
bootstrap.NodeInfo info = 2 [(gogoproto.nullable) = false];
|
2020-04-15 09:24:21 +00:00
|
|
|
// State contains node status
|
|
|
|
State state = 3;
|
2020-01-30 11:41:24 +00:00
|
|
|
// 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];
|
|
|
|
}
|