Documentation ¶
Index ¶
- Variables
- func AttributesToGRPC(as []Attribute) (res []*netmap.NodeInfo_Attribute)
- func ClauseToGRPCMessage(n Clause) netmap.Clause
- func FiltersToGRPC(fs []Filter) (res []*netmap.Filter)
- func IterateSubnets(node *NodeInfo, f func(refs.SubnetID) error) error
- func NodeStateToGRPCMessage(n NodeState) netmap.NodeInfo_State
- func OperationToGRPCMessage(n Operation) netmap.Operation
- func ReplicasToGRPC(rs []Replica) (res []*netmap.Replica)
- func SelectorsToGRPC(ss []Selector) (res []*netmap.Selector)
- func WriteSubnetInfo(node *NodeInfo, info NodeSubnetInfo)
- type Attribute
- func (a *Attribute) FromGRPCMessage(m grpc.Message) error
- func (a *Attribute) GetKey() string
- func (a *Attribute) GetParents() []string
- func (a *Attribute) GetValue() string
- func (a *Attribute) MarshalJSON() ([]byte, error)
- func (a *Attribute) SetKey(v string)
- func (a *Attribute) SetParents(parent []string)
- func (a *Attribute) SetValue(v string)
- func (a *Attribute) StableMarshal(buf []byte) ([]byte, error)
- func (a *Attribute) StableSize() (size int)
- func (a *Attribute) ToGRPCMessage() grpc.Message
- func (a *Attribute) Unmarshal(data []byte) error
- func (a *Attribute) UnmarshalJSON(data []byte) error
- type Clause
- type Filter
- func (f *Filter) FromGRPCMessage(m grpc.Message) error
- func (f *Filter) GetFilters() []Filter
- func (f *Filter) GetKey() string
- func (f *Filter) GetName() string
- func (f *Filter) GetOp() Operation
- func (f *Filter) GetValue() string
- func (f *Filter) MarshalJSON() ([]byte, error)
- func (f *Filter) SetFilters(filters []Filter)
- func (f *Filter) SetKey(key string)
- func (f *Filter) SetName(name string)
- func (f *Filter) SetOp(op Operation)
- func (f *Filter) SetValue(value string)
- func (f *Filter) StableMarshal(buf []byte) ([]byte, error)
- func (f *Filter) StableSize() (size int)
- func (f *Filter) ToGRPCMessage() grpc.Message
- func (f *Filter) Unmarshal(data []byte) error
- func (f *Filter) UnmarshalJSON(data []byte) error
- type LocalNodeInfoRequest
- type LocalNodeInfoRequestBody
- func (l *LocalNodeInfoRequestBody) FromGRPCMessage(m grpc.Message) error
- func (l *LocalNodeInfoRequestBody) StableMarshal(buf []byte) ([]byte, error)
- func (l *LocalNodeInfoRequestBody) StableSize() (size int)
- func (l *LocalNodeInfoRequestBody) ToGRPCMessage() grpc.Message
- func (l *LocalNodeInfoRequestBody) Unmarshal([]byte) error
- type LocalNodeInfoResponse
- type LocalNodeInfoResponseBody
- func (l *LocalNodeInfoResponseBody) FromGRPCMessage(m grpc.Message) error
- func (l *LocalNodeInfoResponseBody) GetNodeInfo() *NodeInfo
- func (l *LocalNodeInfoResponseBody) GetVersion() *refs.Version
- func (l *LocalNodeInfoResponseBody) SetNodeInfo(nodeInfo *NodeInfo)
- func (l *LocalNodeInfoResponseBody) SetVersion(version *refs.Version)
- func (l *LocalNodeInfoResponseBody) StableMarshal(buf []byte) ([]byte, error)
- func (l *LocalNodeInfoResponseBody) StableSize() (size int)
- func (l *LocalNodeInfoResponseBody) ToGRPCMessage() grpc.Message
- func (l *LocalNodeInfoResponseBody) Unmarshal(data []byte) error
- type NetworkConfig
- func (x *NetworkConfig) FromGRPCMessage(m grpc.Message) error
- func (x *NetworkConfig) IterateParameters(f func(*NetworkParameter) bool)
- func (x *NetworkConfig) NumberOfParameters() int
- func (x *NetworkConfig) SetParameters(v ...NetworkParameter)
- func (x *NetworkConfig) StableMarshal(buf []byte) ([]byte, error)
- func (x *NetworkConfig) StableSize() (size int)
- func (x *NetworkConfig) ToGRPCMessage() grpc.Message
- type NetworkInfo
- func (i *NetworkInfo) FromGRPCMessage(m grpc.Message) error
- func (i *NetworkInfo) GetCurrentEpoch() uint64
- func (i *NetworkInfo) GetMagicNumber() uint64
- func (i *NetworkInfo) GetMsPerBlock() int64
- func (i *NetworkInfo) GetNetworkConfig() *NetworkConfig
- func (i *NetworkInfo) MarshalJSON() ([]byte, error)
- func (i *NetworkInfo) SetCurrentEpoch(epoch uint64)
- func (i *NetworkInfo) SetMagicNumber(magic uint64)
- func (i *NetworkInfo) SetMsPerBlock(v int64)
- func (i *NetworkInfo) SetNetworkConfig(v *NetworkConfig)
- func (i *NetworkInfo) StableMarshal(buf []byte) ([]byte, error)
- func (i *NetworkInfo) StableSize() (size int)
- func (i *NetworkInfo) ToGRPCMessage() grpc.Message
- func (i *NetworkInfo) Unmarshal(data []byte) error
- func (i *NetworkInfo) UnmarshalJSON(data []byte) error
- type NetworkInfoRequest
- type NetworkInfoRequestBody
- func (l *NetworkInfoRequestBody) FromGRPCMessage(m grpc.Message) error
- func (l *NetworkInfoRequestBody) StableMarshal(buf []byte) ([]byte, error)
- func (l *NetworkInfoRequestBody) StableSize() (size int)
- func (l *NetworkInfoRequestBody) ToGRPCMessage() grpc.Message
- func (l *NetworkInfoRequestBody) Unmarshal(data []byte) error
- type NetworkInfoResponse
- type NetworkInfoResponseBody
- func (i *NetworkInfoResponseBody) FromGRPCMessage(m grpc.Message) error
- func (i *NetworkInfoResponseBody) GetNetworkInfo() *NetworkInfo
- func (i *NetworkInfoResponseBody) SetNetworkInfo(netInfo *NetworkInfo)
- func (i *NetworkInfoResponseBody) StableMarshal(buf []byte) ([]byte, error)
- func (i *NetworkInfoResponseBody) StableSize() (size int)
- func (i *NetworkInfoResponseBody) ToGRPCMessage() grpc.Message
- func (i *NetworkInfoResponseBody) Unmarshal(data []byte) error
- type NetworkParameter
- func (x *NetworkParameter) FromGRPCMessage(m grpc.Message) error
- func (x *NetworkParameter) GetKey() []byte
- func (x *NetworkParameter) GetValue() []byte
- func (x *NetworkParameter) SetKey(k []byte)
- func (x *NetworkParameter) SetValue(v []byte)
- func (x *NetworkParameter) StableMarshal(buf []byte) ([]byte, error)
- func (x *NetworkParameter) StableSize() (size int)
- func (x *NetworkParameter) ToGRPCMessage() grpc.Message
- type NodeInfo
- func (ni *NodeInfo) FromGRPCMessage(m grpc.Message) error
- func (ni *NodeInfo) GetAddress() (addr string)deprecated
- func (ni *NodeInfo) GetAttributes() []Attribute
- func (ni *NodeInfo) GetPublicKey() []byte
- func (ni *NodeInfo) GetState() NodeState
- func (ni *NodeInfo) IterateAddresses(f func(string) bool)
- func (ni *NodeInfo) MarshalJSON() ([]byte, error)
- func (ni *NodeInfo) NumberOfAddresses() int
- func (ni *NodeInfo) SetAddress(v string)deprecated
- func (ni *NodeInfo) SetAddresses(v ...string)
- func (ni *NodeInfo) SetAttributes(v []Attribute)
- func (ni *NodeInfo) SetPublicKey(v []byte)
- func (ni *NodeInfo) SetState(state NodeState)
- func (ni *NodeInfo) StableMarshal(buf []byte) ([]byte, error)
- func (ni *NodeInfo) StableSize() (size int)
- func (ni *NodeInfo) ToGRPCMessage() grpc.Message
- func (ni *NodeInfo) Unmarshal(data []byte) error
- func (ni *NodeInfo) UnmarshalJSON(data []byte) error
- type NodeState
- type NodeSubnetInfo
- type Operation
- type PlacementPolicy
- func (p *PlacementPolicy) FromGRPCMessage(m grpc.Message) error
- func (p *PlacementPolicy) GetContainerBackupFactor() uint32
- func (p *PlacementPolicy) GetFilters() []Filter
- func (p *PlacementPolicy) GetReplicas() []Replica
- func (p *PlacementPolicy) GetSelectors() []Selector
- func (p *PlacementPolicy) GetSubnetID() *refs.SubnetID
- func (p *PlacementPolicy) MarshalJSON() ([]byte, error)
- func (p *PlacementPolicy) SetContainerBackupFactor(backupFactor uint32)
- func (p *PlacementPolicy) SetFilters(filters []Filter)
- func (p *PlacementPolicy) SetReplicas(replicas []Replica)
- func (p *PlacementPolicy) SetSelectors(selectors []Selector)
- func (p *PlacementPolicy) SetSubnetID(id *refs.SubnetID)
- func (p *PlacementPolicy) StableMarshal(buf []byte) ([]byte, error)
- func (p *PlacementPolicy) StableSize() (size int)
- func (p *PlacementPolicy) ToGRPCMessage() grpc.Message
- func (p *PlacementPolicy) Unmarshal(data []byte) error
- func (p *PlacementPolicy) UnmarshalJSON(data []byte) error
- type Replica
- func (r *Replica) FromGRPCMessage(m grpc.Message) error
- func (r *Replica) GetCount() uint32
- func (r *Replica) GetSelector() string
- func (r *Replica) MarshalJSON() ([]byte, error)
- func (r *Replica) SetCount(count uint32)
- func (r *Replica) SetSelector(selector string)
- func (r *Replica) StableMarshal(buf []byte) ([]byte, error)
- func (r *Replica) StableSize() (size int)
- func (r *Replica) ToGRPCMessage() grpc.Message
- func (r *Replica) Unmarshal(data []byte) error
- func (r *Replica) UnmarshalJSON(data []byte) error
- type Selector
- func (s *Selector) FromGRPCMessage(m grpc.Message) error
- func (s *Selector) GetAttribute() string
- func (s *Selector) GetClause() Clause
- func (s *Selector) GetCount() uint32
- func (s *Selector) GetFilter() string
- func (s *Selector) GetName() string
- func (s *Selector) MarshalJSON() ([]byte, error)
- func (s *Selector) SetAttribute(attribute string)
- func (s *Selector) SetClause(clause Clause)
- func (s *Selector) SetCount(count uint32)
- func (s *Selector) SetFilter(filter string)
- func (s *Selector) SetName(name string)
- func (s *Selector) StableMarshal(buf []byte) ([]byte, error)
- func (s *Selector) StableSize() (size int)
- func (s *Selector) ToGRPCMessage() grpc.Message
- func (s *Selector) Unmarshal(data []byte) error
- func (s *Selector) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
var ErrRemoveSubnet = errors.New("remove subnet")
ErrRemoveSubnet is returned when a node needs to leave the subnet.
Functions ¶
func AttributesToGRPC ¶
func AttributesToGRPC(as []Attribute) (res []*netmap.NodeInfo_Attribute)
func ClauseToGRPCMessage ¶
func FiltersToGRPC ¶
func IterateSubnets ¶
IterateSubnets iterates over all subnets the node belongs to and passes the IDs to f. Handler must not be nil.
Subnet attributes are expected to be key-unique, otherwise undefined behavior.
If f returns ErrRemoveSubnet, then removes subnet entry. Note that this leads to an instant mutation of NodeInfo. Breaks on any other non-nil error and returns it.
Returns an error if any subnet attribute has wrong format. Returns an error if the node is not included in any subnet by the end of the loop.
func NodeStateToGRPCMessage ¶
func NodeStateToGRPCMessage(n NodeState) netmap.NodeInfo_State
func OperationToGRPCMessage ¶
func ReplicasToGRPC ¶
func SelectorsToGRPC ¶
func WriteSubnetInfo ¶
func WriteSubnetInfo(node *NodeInfo, info NodeSubnetInfo)
WriteSubnetInfo writes NodeSubnetInfo to NodeInfo via attributes. NodeInfo must not be nil.
Existing subnet attributes are expected to be key-unique, otherwise undefined behavior.
Does not add (removes existing) attribute if node:
- disables non-zero subnet;
- enables zero subnet.
Attribute key is calculated from ID using format `__NEOFS__SUBNET_%s`. Attribute Value is:
- `True` if node enters the subnet;
- `False`, otherwise.
Types ¶
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
Attribute of storage node.
func AttributesFromGRPC ¶
func AttributesFromGRPC(as []*netmap.NodeInfo_Attribute) (res []Attribute, err error)
func (*Attribute) GetParents ¶
func (*Attribute) MarshalJSON ¶
func (*Attribute) SetParents ¶
func (*Attribute) StableSize ¶
func (*Attribute) ToGRPCMessage ¶
func (*Attribute) UnmarshalJSON ¶
type Clause ¶
type Clause uint32
Clause of placement selector.
func ClauseFromGRPCMessage ¶
func (*Clause) FromString ¶
FromString parses Clause from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func (*Filter) GetFilters ¶
func (*Filter) MarshalJSON ¶
func (*Filter) SetFilters ¶
func (*Filter) StableSize ¶
func (*Filter) ToGRPCMessage ¶
func (*Filter) UnmarshalJSON ¶
type LocalNodeInfoRequest ¶
type LocalNodeInfoRequest struct { session.RequestHeaders // contains filtered or unexported fields }
func (*LocalNodeInfoRequest) FromGRPCMessage ¶
func (l *LocalNodeInfoRequest) FromGRPCMessage(m grpc.Message) error
func (*LocalNodeInfoRequest) GetBody ¶
func (l *LocalNodeInfoRequest) GetBody() *LocalNodeInfoRequestBody
func (*LocalNodeInfoRequest) SetBody ¶
func (l *LocalNodeInfoRequest) SetBody(body *LocalNodeInfoRequestBody)
func (*LocalNodeInfoRequest) ToGRPCMessage ¶
func (l *LocalNodeInfoRequest) ToGRPCMessage() grpc.Message
type LocalNodeInfoRequestBody ¶
type LocalNodeInfoRequestBody struct{}
func (*LocalNodeInfoRequestBody) FromGRPCMessage ¶
func (l *LocalNodeInfoRequestBody) FromGRPCMessage(m grpc.Message) error
func (*LocalNodeInfoRequestBody) StableMarshal ¶
func (l *LocalNodeInfoRequestBody) StableMarshal(buf []byte) ([]byte, error)
func (*LocalNodeInfoRequestBody) StableSize ¶
func (l *LocalNodeInfoRequestBody) StableSize() (size int)
func (*LocalNodeInfoRequestBody) ToGRPCMessage ¶
func (l *LocalNodeInfoRequestBody) ToGRPCMessage() grpc.Message
func (*LocalNodeInfoRequestBody) Unmarshal ¶
func (l *LocalNodeInfoRequestBody) Unmarshal([]byte) error
type LocalNodeInfoResponse ¶
type LocalNodeInfoResponse struct { session.ResponseHeaders // contains filtered or unexported fields }
func (*LocalNodeInfoResponse) FromGRPCMessage ¶
func (l *LocalNodeInfoResponse) FromGRPCMessage(m grpc.Message) error
func (*LocalNodeInfoResponse) GetBody ¶
func (l *LocalNodeInfoResponse) GetBody() *LocalNodeInfoResponseBody
func (*LocalNodeInfoResponse) SetBody ¶
func (l *LocalNodeInfoResponse) SetBody(body *LocalNodeInfoResponseBody)
func (*LocalNodeInfoResponse) ToGRPCMessage ¶
func (l *LocalNodeInfoResponse) ToGRPCMessage() grpc.Message
type LocalNodeInfoResponseBody ¶
type LocalNodeInfoResponseBody struct {
// contains filtered or unexported fields
}
func (*LocalNodeInfoResponseBody) FromGRPCMessage ¶
func (l *LocalNodeInfoResponseBody) FromGRPCMessage(m grpc.Message) error
func (*LocalNodeInfoResponseBody) GetNodeInfo ¶
func (l *LocalNodeInfoResponseBody) GetNodeInfo() *NodeInfo
func (*LocalNodeInfoResponseBody) GetVersion ¶
func (l *LocalNodeInfoResponseBody) GetVersion() *refs.Version
func (*LocalNodeInfoResponseBody) SetNodeInfo ¶
func (l *LocalNodeInfoResponseBody) SetNodeInfo(nodeInfo *NodeInfo)
func (*LocalNodeInfoResponseBody) SetVersion ¶
func (l *LocalNodeInfoResponseBody) SetVersion(version *refs.Version)
func (*LocalNodeInfoResponseBody) StableMarshal ¶
func (l *LocalNodeInfoResponseBody) StableMarshal(buf []byte) ([]byte, error)
func (*LocalNodeInfoResponseBody) StableSize ¶
func (l *LocalNodeInfoResponseBody) StableSize() (size int)
func (*LocalNodeInfoResponseBody) ToGRPCMessage ¶
func (l *LocalNodeInfoResponseBody) ToGRPCMessage() grpc.Message
func (*LocalNodeInfoResponseBody) Unmarshal ¶
func (l *LocalNodeInfoResponseBody) Unmarshal(data []byte) error
type NetworkConfig ¶
type NetworkConfig struct {
// contains filtered or unexported fields
}
NetworkConfig represents NeoFS network configuration.
func (*NetworkConfig) FromGRPCMessage ¶
func (x *NetworkConfig) FromGRPCMessage(m grpc.Message) error
func (*NetworkConfig) IterateParameters ¶
func (x *NetworkConfig) IterateParameters(f func(*NetworkParameter) bool)
IterateParameters iterates over network parameters. Breaks iteration on f's true return.
Handler must not be nil.
func (*NetworkConfig) NumberOfParameters ¶
func (x *NetworkConfig) NumberOfParameters() int
NumberOfParameters returns number of network parameters.
func (*NetworkConfig) SetParameters ¶
func (x *NetworkConfig) SetParameters(v ...NetworkParameter)
SetParameters sets list of network parameters.
func (*NetworkConfig) StableMarshal ¶
func (x *NetworkConfig) StableMarshal(buf []byte) ([]byte, error)
func (*NetworkConfig) StableSize ¶
func (x *NetworkConfig) StableSize() (size int)
func (*NetworkConfig) ToGRPCMessage ¶
func (x *NetworkConfig) ToGRPCMessage() grpc.Message
type NetworkInfo ¶
type NetworkInfo struct {
// contains filtered or unexported fields
}
NetworkInfo groups information about NeoFS network.
func (*NetworkInfo) FromGRPCMessage ¶
func (i *NetworkInfo) FromGRPCMessage(m grpc.Message) error
func (*NetworkInfo) GetCurrentEpoch ¶
func (i *NetworkInfo) GetCurrentEpoch() uint64
GetCurrentEpoch returns number of the current epoch.
func (*NetworkInfo) GetMagicNumber ¶
func (i *NetworkInfo) GetMagicNumber() uint64
GetMagicNumber returns magic number of the sidechain.
func (*NetworkInfo) GetMsPerBlock ¶
func (i *NetworkInfo) GetMsPerBlock() int64
GetMsPerBlock returns MillisecondsPerBlock network parameter.
func (*NetworkInfo) GetNetworkConfig ¶
func (i *NetworkInfo) GetNetworkConfig() *NetworkConfig
GetNetworkConfig returns NeoFS network configuration.
func (*NetworkInfo) MarshalJSON ¶
func (i *NetworkInfo) MarshalJSON() ([]byte, error)
func (*NetworkInfo) SetCurrentEpoch ¶
func (i *NetworkInfo) SetCurrentEpoch(epoch uint64)
SetCurrentEpoch sets number of the current epoch.
func (*NetworkInfo) SetMagicNumber ¶
func (i *NetworkInfo) SetMagicNumber(magic uint64)
SetMagicNumber sets magic number of the sidechain.
func (*NetworkInfo) SetMsPerBlock ¶
func (i *NetworkInfo) SetMsPerBlock(v int64)
SetMsPerBlock sets MillisecondsPerBlock network parameter.
func (*NetworkInfo) SetNetworkConfig ¶
func (i *NetworkInfo) SetNetworkConfig(v *NetworkConfig)
SetNetworkConfig sets NeoFS network configuration.
func (*NetworkInfo) StableMarshal ¶
func (i *NetworkInfo) StableMarshal(buf []byte) ([]byte, error)
func (*NetworkInfo) StableSize ¶
func (i *NetworkInfo) StableSize() (size int)
func (*NetworkInfo) ToGRPCMessage ¶
func (i *NetworkInfo) ToGRPCMessage() grpc.Message
func (*NetworkInfo) Unmarshal ¶
func (i *NetworkInfo) Unmarshal(data []byte) error
func (*NetworkInfo) UnmarshalJSON ¶
func (i *NetworkInfo) UnmarshalJSON(data []byte) error
type NetworkInfoRequest ¶
type NetworkInfoRequest struct { session.RequestHeaders // contains filtered or unexported fields }
NetworkInfoRequest is a structure of NetworkInfo request.
func (*NetworkInfoRequest) FromGRPCMessage ¶
func (l *NetworkInfoRequest) FromGRPCMessage(m grpc.Message) error
func (*NetworkInfoRequest) GetBody ¶
func (l *NetworkInfoRequest) GetBody() *NetworkInfoRequestBody
func (*NetworkInfoRequest) SetBody ¶
func (l *NetworkInfoRequest) SetBody(body *NetworkInfoRequestBody)
func (*NetworkInfoRequest) ToGRPCMessage ¶
func (l *NetworkInfoRequest) ToGRPCMessage() grpc.Message
type NetworkInfoRequestBody ¶
type NetworkInfoRequestBody struct{}
NetworkInfoRequestBody is a structure of NetworkInfo request body.
func (*NetworkInfoRequestBody) FromGRPCMessage ¶
func (l *NetworkInfoRequestBody) FromGRPCMessage(m grpc.Message) error
func (*NetworkInfoRequestBody) StableMarshal ¶
func (l *NetworkInfoRequestBody) StableMarshal(buf []byte) ([]byte, error)
func (*NetworkInfoRequestBody) StableSize ¶
func (l *NetworkInfoRequestBody) StableSize() (size int)
func (*NetworkInfoRequestBody) ToGRPCMessage ¶
func (l *NetworkInfoRequestBody) ToGRPCMessage() grpc.Message
func (*NetworkInfoRequestBody) Unmarshal ¶
func (l *NetworkInfoRequestBody) Unmarshal(data []byte) error
type NetworkInfoResponse ¶
type NetworkInfoResponse struct { session.ResponseHeaders // contains filtered or unexported fields }
NetworkInfoResponse is a structure of NetworkInfo response.
func (*NetworkInfoResponse) FromGRPCMessage ¶
func (l *NetworkInfoResponse) FromGRPCMessage(m grpc.Message) error
func (*NetworkInfoResponse) GetBody ¶
func (l *NetworkInfoResponse) GetBody() *NetworkInfoResponseBody
func (*NetworkInfoResponse) SetBody ¶
func (l *NetworkInfoResponse) SetBody(body *NetworkInfoResponseBody)
func (*NetworkInfoResponse) ToGRPCMessage ¶
func (l *NetworkInfoResponse) ToGRPCMessage() grpc.Message
type NetworkInfoResponseBody ¶
type NetworkInfoResponseBody struct {
// contains filtered or unexported fields
}
NetworkInfoResponseBody is a structure of NetworkInfo response body.
func (*NetworkInfoResponseBody) FromGRPCMessage ¶
func (i *NetworkInfoResponseBody) FromGRPCMessage(m grpc.Message) error
func (*NetworkInfoResponseBody) GetNetworkInfo ¶
func (i *NetworkInfoResponseBody) GetNetworkInfo() *NetworkInfo
GetNetworkInfo returns information about the NeoFS network.
func (*NetworkInfoResponseBody) SetNetworkInfo ¶
func (i *NetworkInfoResponseBody) SetNetworkInfo(netInfo *NetworkInfo)
SetNetworkInfo sets information about the NeoFS network.
func (*NetworkInfoResponseBody) StableMarshal ¶
func (i *NetworkInfoResponseBody) StableMarshal(buf []byte) ([]byte, error)
func (*NetworkInfoResponseBody) StableSize ¶
func (i *NetworkInfoResponseBody) StableSize() (size int)
func (*NetworkInfoResponseBody) ToGRPCMessage ¶
func (i *NetworkInfoResponseBody) ToGRPCMessage() grpc.Message
func (*NetworkInfoResponseBody) Unmarshal ¶
func (i *NetworkInfoResponseBody) Unmarshal(data []byte) error
type NetworkParameter ¶
type NetworkParameter struct {
// contains filtered or unexported fields
}
NetworkParameter represents NeoFS network parameter.
func (*NetworkParameter) FromGRPCMessage ¶
func (x *NetworkParameter) FromGRPCMessage(m grpc.Message) error
func (*NetworkParameter) GetKey ¶
func (x *NetworkParameter) GetKey() []byte
GetKey returns parameter key.
func (*NetworkParameter) GetValue ¶
func (x *NetworkParameter) GetValue() []byte
GetValue returns parameter value.
func (*NetworkParameter) SetKey ¶
func (x *NetworkParameter) SetKey(k []byte)
SetKey sets parameter key.
func (*NetworkParameter) SetValue ¶
func (x *NetworkParameter) SetValue(v []byte)
SetValue sets parameter value.
func (*NetworkParameter) StableMarshal ¶
func (x *NetworkParameter) StableMarshal(buf []byte) ([]byte, error)
func (*NetworkParameter) StableSize ¶
func (x *NetworkParameter) StableSize() (size int)
func (*NetworkParameter) ToGRPCMessage ¶
func (x *NetworkParameter) ToGRPCMessage() grpc.Message
type NodeInfo ¶
type NodeInfo struct {
// contains filtered or unexported fields
}
NodeInfo of storage node.
func (*NodeInfo) GetAddress
deprecated
func (*NodeInfo) GetAttributes ¶
func (*NodeInfo) GetPublicKey ¶
func (*NodeInfo) IterateAddresses ¶
IterateAddresses iterates over network addresses of the node. Breaks iteration on f's true return.
Handler should not be nil.
func (*NodeInfo) MarshalJSON ¶
func (*NodeInfo) NumberOfAddresses ¶
NumberOfAddresses returns number of network addresses of the node.
func (*NodeInfo) SetAddress
deprecated
func (*NodeInfo) SetAddresses ¶
SetAddresses sets list of network addresses of the node.
func (*NodeInfo) SetAttributes ¶
func (*NodeInfo) SetPublicKey ¶
func (*NodeInfo) StableSize ¶
func (*NodeInfo) ToGRPCMessage ¶
func (*NodeInfo) UnmarshalJSON ¶
type NodeState ¶
type NodeState uint32
NodeState of storage node.
func NodeStateFromRPCMessage ¶
func NodeStateFromRPCMessage(n netmap.NodeInfo_State) NodeState
func (*NodeState) FromString ¶
FromString parses NodeState from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
type NodeSubnetInfo ¶
type NodeSubnetInfo struct {
// contains filtered or unexported fields
}
NodeSubnetInfo groups information about subnet which can be written to NodeInfo.
Zero value represents entry to zero subnet.
func (NodeSubnetInfo) Enabled ¶
func (x NodeSubnetInfo) Enabled() bool
Enabled returns true iff subnet membership is enabled for the node.
func (NodeSubnetInfo) ID ¶
func (x NodeSubnetInfo) ID() *refs.SubnetID
ID returns identifier of the subnet.
func (*NodeSubnetInfo) SetEntryFlag ¶
func (x *NodeSubnetInfo) SetEntryFlag(enters bool)
SetEntryFlag sets the subnet entry flag.
func (*NodeSubnetInfo) SetID ¶
func (x *NodeSubnetInfo) SetID(id *refs.SubnetID)
SetID sets identifier of the subnet.
type Operation ¶
type Operation uint32
func (*Operation) FromString ¶
FromString parses Operation from a string representation. It is a reverse action to String().
Returns true if s was parsed successfully.
type PlacementPolicy ¶
type PlacementPolicy struct {
// contains filtered or unexported fields
}
func (*PlacementPolicy) FromGRPCMessage ¶
func (p *PlacementPolicy) FromGRPCMessage(m grpc.Message) error
func (*PlacementPolicy) GetContainerBackupFactor ¶
func (p *PlacementPolicy) GetContainerBackupFactor() uint32
func (*PlacementPolicy) GetFilters ¶
func (p *PlacementPolicy) GetFilters() []Filter
func (*PlacementPolicy) GetReplicas ¶
func (p *PlacementPolicy) GetReplicas() []Replica
func (*PlacementPolicy) GetSelectors ¶
func (p *PlacementPolicy) GetSelectors() []Selector
func (*PlacementPolicy) GetSubnetID ¶
func (p *PlacementPolicy) GetSubnetID() *refs.SubnetID
func (*PlacementPolicy) MarshalJSON ¶
func (p *PlacementPolicy) MarshalJSON() ([]byte, error)
func (*PlacementPolicy) SetContainerBackupFactor ¶
func (p *PlacementPolicy) SetContainerBackupFactor(backupFactor uint32)
func (*PlacementPolicy) SetFilters ¶
func (p *PlacementPolicy) SetFilters(filters []Filter)
func (*PlacementPolicy) SetReplicas ¶
func (p *PlacementPolicy) SetReplicas(replicas []Replica)
func (*PlacementPolicy) SetSelectors ¶
func (p *PlacementPolicy) SetSelectors(selectors []Selector)
func (*PlacementPolicy) SetSubnetID ¶
func (p *PlacementPolicy) SetSubnetID(id *refs.SubnetID)
func (*PlacementPolicy) StableMarshal ¶
func (p *PlacementPolicy) StableMarshal(buf []byte) ([]byte, error)
func (*PlacementPolicy) StableSize ¶
func (p *PlacementPolicy) StableSize() (size int)
func (*PlacementPolicy) ToGRPCMessage ¶
func (p *PlacementPolicy) ToGRPCMessage() grpc.Message
func (*PlacementPolicy) Unmarshal ¶
func (p *PlacementPolicy) Unmarshal(data []byte) error
func (*PlacementPolicy) UnmarshalJSON ¶
func (p *PlacementPolicy) UnmarshalJSON(data []byte) error
type Replica ¶
type Replica struct {
// contains filtered or unexported fields
}
func (*Replica) GetSelector ¶
func (*Replica) MarshalJSON ¶
func (*Replica) SetSelector ¶
func (*Replica) StableSize ¶
func (*Replica) ToGRPCMessage ¶
func (*Replica) UnmarshalJSON ¶
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}