pusher

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: BSD-3-Clause Imports: 17 Imported by: 3

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")
)

Functions

This section is empty.

Types

type Op

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

type OpChan

type OpChan <-chan *Op

type Service

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

func New

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

func (*Service) AddFeed

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

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