bvstreamseeder

package
v0.0.0-...-34d0e24 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 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")
	ErrWrongSelectorLen = errors.New("wrong event selector length")
)

Functions

This section is empty.

Types

type Callbacks

type Callbacks struct {
	Iterate func(locator []byte, f func(key []byte, bvs 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(bvstream.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 bvstream.Request) (err error, peerErr error)

Jump to

Keyboard shortcuts

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