puller

package
v2.8.4-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: BSD-3-Clause Imports: 20 Imported by: 3 modules, 2 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

Overview

Package puller provides protocol-orchestrating functionality over the pullsync protocol. It pulls chunks from other nodes and reacts to changes in network configuration.

Index

Constants

View Source
const (
	// DefaultHistRateWindow must stay shorter than the reserve worker wakeup
	// (reserveWakeUpDuration in pkg/node), so a full window of syncing has
	// passed before the radius is decreased again.
	DefaultHistRateWindow = time.Minute * 10

	IntervalPrefix = "sync_interval"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Bins uint8
}

type Puller

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

func New

func New(
	addr swarm.Address,
	stateStore storage.StateStorer,
	topology topology.Driver,
	reserveState storer.RadiusChecker,
	pullSync pullsync.Interface,
	blockLister p2p.Blocklister,
	logger log.Logger,
	o Options,
) *Puller

func (*Puller) Close

func (p *Puller) Close() error

func (*Puller) IsReserveSynced

func (p *Puller) IsReserveSynced(depth uint8) bool

IsReserveSynced returns true if no bin at or above depth is historically syncing. A depth beyond the tracked bins is never reported as synced.

func (*Puller) Metrics

func (p *Puller) Metrics() []prometheus.Collector

func (*Puller) Start

func (p *Puller) Start(ctx context.Context)

func (*Puller) SyncRateWithinRadius

func (p *Puller) SyncRateWithinRadius() float64

SyncRateWithinRadius returns the historical sync rate of the bins within the storage radius.

Directories

Path Synopsis
Package intervalstore provides a persistence layer for intervals relating to a peer.
Package intervalstore provides a persistence layer for intervals relating to a peer.

Jump to

Keyboard shortcuts

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