netmap

package
v0.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("network map not found")

ErrNotFound is the error returned when network map was not found in storage.

Functions

func GetLatestNetworkMap added in v0.12.0

func GetLatestNetworkMap(src Source) (*netmap.Netmap, error)

GetLatestNetworkMap requests and returns latest network map from storage.

func GetPreviousNetworkMap added in v0.12.0

func GetPreviousNetworkMap(src Source) (*netmap.Netmap, error)

GetPreviousNetworkMap requests and returns previous from latest network map from storage.

Types

type Source added in v0.12.0

type Source interface {
	// GetNetMap reads the diff-th past network map from the storage.
	// Calling with zero diff returns latest network map.
	// It returns the pointer to 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 storage.
	//
	// Implementations must not retain the network map pointer and modify
	// the network map through it.
	GetNetMap(diff uint64) (*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 number of current NeoFS epoch.
	CurrentEpoch() uint64
}

State groups current system state parameters.

Jump to

Keyboard shortcuts

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