Documentation ¶
Index ¶
- type Callbacks
- type Config
- type Leecher
- func (d *Leecher) ForceSyncing()
- func (d *Leecher) NotifyChunkReceived(sessionID uint32, last hash.Event, done bool) error
- func (d *Leecher) OnNewEpoch(myEpoch idx.Epoch)
- func (d *Leecher) PeersNum() int
- func (d *Leecher) RegisterPeer(peer string) error
- func (d *Leecher) Start()
- func (d *Leecher) Stop()
- func (d *Leecher) UnregisterPeer(peer string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Leecher ¶
type Leecher struct {
// contains filtered or unexported fields
}
Leecher is responsible for requesting events based on lexicographic event streams
func (*Leecher) ForceSyncing ¶
func (d *Leecher) ForceSyncing()
func (*Leecher) NotifyChunkReceived ¶
func (*Leecher) OnNewEpoch ¶
func (*Leecher) RegisterPeer ¶
RegisterPeer injects a new download peer to download epochs from.
func (*Leecher) Stop ¶
func (d *Leecher) Stop()
Stop interrupts the leecher, canceling all the pending operations. Stop waits until all the internal goroutines have finished.
func (*Leecher) UnregisterPeer ¶
UnregisterPeer removes a peer from the known list, preventing current or any future sessions with the peer
Click to show internal directories.
Click to hide internal directories.