Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSelectorMismatch = errors.New("session selector mismatch") ErrTooManyChunks = errors.New("too many request chunks") )
Functions ¶
This section is empty.
Types ¶
type BaseSeeder ¶
type BaseSeeder struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg Config, callbacks Callbacks) *BaseSeeder
func (*BaseSeeder) NotifyRequestReceived ¶
func (s *BaseSeeder) NotifyRequestReceived(peer Peer, r basestream.Request) (err error, peerErr error)
func (*BaseSeeder) Start ¶
func (s *BaseSeeder) Start()
func (*BaseSeeder) Stop ¶
func (s *BaseSeeder) Stop()
Stop interrupts the seeder, canceling all the pending operations. Stop waits until all the internal goroutines have finished.
func (*BaseSeeder) UnregisterPeer ¶
func (s *BaseSeeder) UnregisterPeer(peer string) error
type Callbacks ¶
type Callbacks struct {
ForEachItem func(start basestream.Locator, rType basestream.RequestType, onKey func(key basestream.Locator) bool, onAppended func(items basestream.Payload) bool) basestream.Payload
}
Click to show internal directories.
Click to hide internal directories.