Documentation ¶
Index ¶
- Variables
- func RegisterBootstrapServer(s *grpc.Server, srv BootstrapServer)
- type BootstrapClient
- type BootstrapServer
- type NodeInfo
- func (m NodeInfo) Capacity() uint64
- func (*NodeInfo) Descriptor() ([]byte, []int)
- func (m NodeInfo) Equals(n1 NodeInfo) bool
- func (m *NodeInfo) GetAddress() string
- func (m *NodeInfo) GetOptions() []string
- func (m *NodeInfo) GetPubKey() []byte
- func (m *NodeInfo) Marshal() (dAtA []byte, err error)
- func (m *NodeInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *NodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m NodeInfo) Price() uint64
- func (*NodeInfo) ProtoMessage()
- func (m *NodeInfo) Reset()
- func (m *NodeInfo) Size() (n int)
- func (m NodeInfo) String() string
- func (m *NodeInfo) Unmarshal(dAtA []byte) error
- func (m *NodeInfo) XXX_DiscardUnknown()
- func (m *NodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeInfo) XXX_Merge(src proto.Message)
- func (m *NodeInfo) XXX_Size() int
- func (m *NodeInfo) XXX_Unmarshal(b []byte) error
- type NodeStatus
- type NodeType
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetInfo() NodeInfo
- func (m *Request) Marshal() (dAtA []byte, err error)
- func (m *Request) MarshalTo(dAtA []byte) (int, error)
- func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) Size() (n int)
- func (m *Request) String() string
- func (m *Request) Unmarshal(dAtA []byte) error
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type SpreadMap
- func (*SpreadMap) Descriptor() ([]byte, []int)
- func (m *SpreadMap) GetEpoch() uint64
- func (m *SpreadMap) GetNetMap() []NodeInfo
- func (m *SpreadMap) Marshal() (dAtA []byte, err error)
- func (m *SpreadMap) MarshalTo(dAtA []byte) (int, error)
- func (m *SpreadMap) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SpreadMap) ProtoMessage()
- func (m *SpreadMap) Reset()
- func (m *SpreadMap) Size() (n int)
- func (m SpreadMap) String() string
- func (m *SpreadMap) Unmarshal(dAtA []byte) error
- func (m *SpreadMap) XXX_DiscardUnknown()
- func (m *SpreadMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SpreadMap) XXX_Merge(src proto.Message)
- func (m *SpreadMap) XXX_Size() int
- func (m *SpreadMap) XXX_Unmarshal(b []byte) error
- type UnimplementedBootstrapServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterBootstrapServer ¶
func RegisterBootstrapServer(s *grpc.Server, srv BootstrapServer)
Types ¶
type BootstrapClient ¶
type BootstrapClient interface { // Process is method that allows to register node in the network and receive actual netmap Process(ctx context.Context, in *Request, opts ...grpc.CallOption) (*SpreadMap, error) }
BootstrapClient is the client API for Bootstrap service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBootstrapClient ¶
func NewBootstrapClient(cc *grpc.ClientConn) BootstrapClient
type BootstrapServer ¶
type BootstrapServer interface { // Process is method that allows to register node in the network and receive actual netmap Process(context.Context, *Request) (*SpreadMap, error) }
BootstrapServer is the server API for Bootstrap service.
type NodeInfo ¶
type NodeInfo struct { // Address is a node [multi-address](https://github.com/multiformats/multiaddr) Address string `protobuf:"bytes,1,opt,name=Address,proto3" json:"address"` // PubKey is a compressed public key representation in bytes PubKey []byte `protobuf:"bytes,2,opt,name=PubKey,proto3" json:"pubkey,omitempty"` // Options is set of node optional information, such as storage capacity, node location, price and etc Options []string `protobuf:"bytes,3,rep,name=Options,proto3" json:"options,omitempty"` // Status is bitmap status of the node Status NodeStatus `protobuf:"varint,4,opt,name=Status,proto3,customtype=NodeStatus" json:"status"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NodeInfo) Descriptor ¶
func (*NodeInfo) GetAddress ¶
func (*NodeInfo) GetOptions ¶
func (*NodeInfo) MarshalToSizedBuffer ¶
func (NodeInfo) Price ¶
Price returns price in 1e-8*GAS/Megabyte per month. User set price in GAS/Terabyte per month.
func (*NodeInfo) ProtoMessage ¶
func (*NodeInfo) ProtoMessage()
func (*NodeInfo) XXX_DiscardUnknown ¶
func (m *NodeInfo) XXX_DiscardUnknown()
func (*NodeInfo) XXX_Marshal ¶
func (*NodeInfo) XXX_Unmarshal ¶
type NodeStatus ¶
type NodeStatus uint64
NodeStatus is a bitwise status field of the node.
func (NodeStatus) Full ¶
func (n NodeStatus) Full() bool
Full checks if node has enough space for storing users objects.
func (*NodeStatus) SetFull ¶
func (n *NodeStatus) SetFull(value bool)
SetFull changes state of node to indicate if node has enough space for storing users objects. If value is true - there's not enough space.
type Request ¶
type Request struct { // Type is NodeType, can be InnerRingNode (type=1) or StorageNode (type=2) Type NodeType `protobuf:"varint,1,opt,name=type,proto3,customtype=NodeType" json:"type"` // Info contains information about node Info NodeInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info"` // RequestMetaHeader contains information about request meta headers (should be embedded into message) service.RequestMetaHeader `protobuf:"bytes,98,opt,name=Meta,proto3,embedded=Meta" json:"Meta"` // RequestVerificationHeader is a set of signatures of every NeoFS Node that processed request (should be embedded into message) service.RequestVerificationHeader `protobuf:"bytes,99,opt,name=Verify,proto3,embedded=Verify" json:"Verify"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) MarshalToSizedBuffer ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type SpreadMap ¶
type SpreadMap struct { // Epoch is current epoch for netmap Epoch uint64 `protobuf:"varint,1,opt,name=Epoch,proto3" json:"Epoch,omitempty"` // NetMap is a set of NodeInfos NetMap []NodeInfo `protobuf:"bytes,2,rep,name=NetMap,proto3" json:"NetMap"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SpreadMap) Descriptor ¶
func (*SpreadMap) MarshalToSizedBuffer ¶
func (*SpreadMap) ProtoMessage ¶
func (*SpreadMap) ProtoMessage()
func (*SpreadMap) XXX_DiscardUnknown ¶
func (m *SpreadMap) XXX_DiscardUnknown()
func (*SpreadMap) XXX_Marshal ¶
func (*SpreadMap) XXX_Unmarshal ¶
type UnimplementedBootstrapServer ¶
type UnimplementedBootstrapServer struct { }
UnimplementedBootstrapServer can be embedded to have forward compatible implementations.