Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpochDownloaderConfig ¶
type OnlyNotConnectedFn ¶
OnlyNotConnectedFn returns only not connected events.
type PeerLeecher ¶
type PeerLeecher struct {
// contains filtered or unexported fields
}
PeerLeecher is responsible for accumulating pack announcements from various peers and scheduling them for retrieval.
func New ¶
func New(wg *sync.WaitGroup, cfg EpochDownloaderConfig, callback EpochDownloaderCallbacks) *PeerLeecher
New creates a packs fetcher to retrieve events based on pack announcements. Works only with 1 peer.
func (*PeerLeecher) NotifyChunkReceived ¶
func (d *PeerLeecher) NotifyChunkReceived(last hash.Event) error
NotifyPackInfo injects new pack infos from a peer
func (*PeerLeecher) Start ¶
func (d *PeerLeecher) Start()
Start boots up the announcement based synchroniser, accepting and processing hash notifications and event fetches until termination requested.
func (*PeerLeecher) Stop ¶
func (d *PeerLeecher) Stop()
Stop terminates the announcement based synchroniser, canceling all pending operations.
func (*PeerLeecher) Stopped ¶
func (d *PeerLeecher) Stopped() bool
func (*PeerLeecher) Terminate ¶
func (d *PeerLeecher) Terminate()
Click to show internal directories.
Click to hide internal directories.