dagstreamseeder

package
v0.0.0-...-985cc99 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 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 {
	ForEachEvent func(start []byte, onEvent func(key hash.Event, eventB 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(dagstream.Response, hash.Events) 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 dagstream.Request) (err error, peerErr error)

Jump to

Keyboard shortcuts

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