depthmonitor

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultWakeupInterval = 5 * time.Minute

DefaultWakeupInterval is the default value for the depth monitor wake-up interval.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReserveReporter

type ReserveReporter interface {
	// Current size of the reserve.
	ComputeReserveSize(uint8) (uint64, error)
	// Capacity of the reserve that is configured.
	ReserveCapacity() uint64
}

ReserveReporter interface defines the functionality required from the local storage of the node to report information about the reserve. The reserve storage is the storage pledged by the node to the network.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements the depthmonitor service

func New

func New(
	t Topology,
	syncer SyncReporter,
	reserve ReserveReporter,
	bs postage.Storer,
	logger log.Logger,
	warmupTime time.Duration,
	wakeupInterval time.Duration,
) *Service

New constructs a new depthmonitor service

func (*Service) Close

func (s *Service) Close() error

func (*Service) IsFullySynced added in v1.9.0

func (s *Service) IsFullySynced() bool

type SyncReporter

type SyncReporter interface {
	// Number of active historical syncing jobs.
	ActiveHistoricalSyncing() uint64
}

SyncReporter interface needs to be implemented by the syncing component of the node (puller).

type Topology

Topology interface encapsulates the functionality required by the topology component of the node.

Jump to

Keyboard shortcuts

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