Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasePeerLeecher ¶
type BasePeerLeecher struct {
// contains filtered or unexported fields
}
BasePeerLeecher is responsible for scheduling items for retrieval.
func New ¶
func New(wg *sync.WaitGroup, cfg EpochDownloaderConfig, callback EpochDownloaderCallbacks) *BasePeerLeecher
New creates an items fetcher to retrieve items chunk-by-chunk. Works only with 1 peer.
func (*BasePeerLeecher) NotifyChunkReceived ¶
func (d *BasePeerLeecher) NotifyChunkReceived(id interface{}) error
NotifyChunkReceived injects new pack infos from a peer
func (*BasePeerLeecher) Start ¶
func (d *BasePeerLeecher) Start()
Start boots up the announcement based synchroniser, accepting and processing fetches until termination requested.
func (*BasePeerLeecher) Stop ¶
func (d *BasePeerLeecher) Stop()
Stop terminates the announcement based synchroniser, canceling all pending operations.
func (*BasePeerLeecher) Stopped ¶
func (d *BasePeerLeecher) Stopped() bool
func (*BasePeerLeecher) Terminate ¶
func (d *BasePeerLeecher) Terminate()
type EpochDownloaderConfig ¶
type IsProcessed ¶
type IsProcessed func(id interface{}) bool
Click to show internal directories.
Click to hide internal directories.