Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLatestNetworkMap ¶
GetLatestNetworkMap requests and returns the latest network map from the storage.
Types ¶
type AnnouncedKeys ¶
type AnnouncedKeys interface { // IsLocalKey checks if the key was announced by a local node. IsLocalKey(key []byte) bool }
AnnouncedKeys is an interface of utility for working with the announced public keys of the storage nodes.
type Node ¶
Node is a named type of netmap.NodeInfo which provides interface needed in the current repository. Node is expected to be used everywhere instead of direct usage of netmap.NodeInfo, so it represents a type mediator.
func (Node) ExternalAddresses ¶
ExternalAddresses returns external addresses of a node.
func (Node) IterateAddresses ¶
IterateAddresses iterates over all announced network addresses and passes them into f. Handler MUST NOT be nil.
func (Node) NumberOfAddresses ¶
NumberOfAddresses returns number of announced network addresses.
type Nodes ¶
Nodes is a named type of []netmap.NodeInfo which provides interface needed in the current repository. Nodes is expected to be used everywhere instead of direct usage of []netmap.NodeInfo, so it represents a type mediator.
type Source ¶
type Source interface { // GetNetMap reads the diff-th past network map from the storage. // Calling with zero diff returns the latest network map. // It returns the pointer to the requested network map and any error encountered. // // GetNetMap must return exactly one non-nil value. // GetNetMap must return ErrNotFound if the network map is not in the storage. // // Implementations must not retain the network map pointer and modify // the network map through it. GetNetMap(diff uint64) (*netmap.NetMap, error) // GetNetMapByEpoch reads network map by the epoch number from the storage. // It returns the pointer to the requested network map and any error encountered. // // Must return exactly one non-nil value. // // Implementations must not retain the network map pointer and modify // the network map through it. GetNetMapByEpoch(epoch uint64) (*netmap.NetMap, error) // Epoch reads the current epoch from the storage. // It returns thw number of the current epoch and any error encountered. // // Must return exactly one non-default value. Epoch() (uint64, error) }
Source is an interface that wraps basic network map receiving method.