pusher

package
v1.17.6-rc4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: BSD-3-Clause Imports: 17 Imported by: 2 modules, 3 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 pusher provides protocol-orchestrating functionality over the pushsync protocol. It makes sure that chunks meant to be distributed over the network are sent used using the pushsync protocol.

Index

Constants

View Source
const (
	ConcurrentPushes  = 100 // how many chunks to push simultaneously
	DefaultRetryCount = 6
)

Variables

View Source
var (
	ErrInvalidAddress = errors.New("invalid address")
	ErrShallowReceipt = errors.New("shallow recipt")
)

Functions

This section is empty.

Types

type Op added in v1.4.1

type Op struct {
	Chunk  swarm.Chunk
	Err    chan error
	Direct bool
}

type OpChan added in v1.4.1

type OpChan <-chan *Op

type Service

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

func New

func New(
	networkID uint64,
	storer Storer,
	radius func() (uint8, error),
	pushSyncer pushsync.PushSyncer,
	validStamp postage.ValidStampFn,
	logger log.Logger,
	tracer *tracing.Tracer,
	warmupTime time.Duration,
	retryCount int,
) *Service

func (*Service) AddFeed added in v1.4.1

func (s *Service) AddFeed(c <-chan *Op)

func (*Service) Close

func (s *Service) Close() error

func (*Service) Metrics

func (s *Service) Metrics() []prometheus.Collector

type Storer added in v1.17.0

type Storer interface {
	storage.PushReporter
	storage.PushSubscriber
	ReservePutter() storage.Putter
}

Jump to

Keyboard shortcuts

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