netmap

package
v0.45.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2025 License: GPL-3.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnnouncedKeys added in v0.25.0

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 added in v0.29.0

type Node netmap.NodeInfo

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 added in v0.33.0

func (x Node) ExternalAddresses() []string

ExternalAddresses returns external addresses of a node.

func (Node) IterateAddresses added in v0.29.0

func (x Node) IterateAddresses(f func(string) bool)

IterateAddresses iterates over all announced network addresses and passes them into f. Handler MUST NOT be nil.

func (Node) NumberOfAddresses added in v0.29.0

func (x Node) NumberOfAddresses() int

NumberOfAddresses returns number of announced network addresses.

func (Node) PublicKey added in v0.29.0

func (x Node) PublicKey() []byte

PublicKey returns public key bound to the storage node.

Return value MUST NOT be mutated, make a copy first.

type Nodes added in v0.29.0

type Nodes []netmap.NodeInfo

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 added in v0.12.0

type Source interface {
	// 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)

	// NetMap returns current network map.
	NetMap() (*netmap.NetMap, error)
}

Source is an interface that wraps basic network map receiving method.

type State added in v0.12.0

type State interface {
	// CurrentEpoch returns the number of the current NeoFS epoch.
	CurrentEpoch() uint64
}

State groups the current system state parameters.

type StateDetailed added in v0.45.0

type StateDetailed interface {
	State
	CurrentBlock() uint32
	CurrentEpochDuration() uint64
}

StateDetailed groups block, epoch and its duration information about FS chain.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL