Documentation
¶
Overview ¶
Package state collects functionality for verifying states of network map members.
NetMapCandidateValidator type provides an interface for checking the network map candidates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetMapCandidateValidator ¶
type NetMapCandidateValidator struct {
}
NetMapCandidateValidator represents tool which checks state of nodes which are going to register in the NeoFS network (enter the network map).
NetMapCandidateValidator can be instantiated using built-in var declaration and currently doesn't require any additional initialization.
NetMapCandidateValidator implements github.com/nspcc-dev/neofs-node/pkg/innerring/processors/netmap.NodeValidator.
func New ¶ added in v0.47.0
func New() *NetMapCandidateValidator
New creates a new instance of the NetMapCandidateValidator.
The created NetMapCandidateValidator does not require additional initialization and is completely ready for work.
func (*NetMapCandidateValidator) Verify ¶ added in v0.39.0
func (x *NetMapCandidateValidator) Verify(node netmap.NodeInfo) error
Verify checks state of the network map candidate described by netmap.NodeInfo parameter. Returns no error if status is correct, otherwise returns an error describing a violation of the rules:
status MUST be either ONLINE or MAINTENANCE;
Verify does not mutate the parameter in a binary format. MUST NOT be called before SetNetworkSettings.
See also netmap.NodeInfo.IsOnline/SetOnline and other similar methods.