epstreamseeder

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongType = errors.New("wrong request type")
)

Functions

This section is empty.

Types

type Callbacks

type Callbacks struct {
	Iterate func(start idx.Epoch, f func(epoch idx.Epoch, eps rlp.RawValue) bool)
}

type Config

type Config basestreamseeder.Config

func DefaultConfig

func DefaultConfig(scale cachescale.Func) Config

type Peer

type Peer struct {
	ID           string
	SendChunk    func(epstream.Response) error
	Misbehaviour func(error)
}

type Seeder

type Seeder struct {
	*basestreamseeder.BaseSeeder
}

func New

func New(cfg Config, callbacks Callbacks) *Seeder

func (*Seeder) NotifyRequestReceived

func (s *Seeder) NotifyRequestReceived(peer Peer, r epstream.Request) (err error, peerErr error)

Jump to

Keyboard shortcuts

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