Documentation ¶
Index ¶
- Constants
- type Peer
- type Peers
- func (p *Peers) BanBadPeer(pid peer.ID)
- func (p *Peers) DisconnectPeer(pid peer.ID)
- func (p *Peers) Forgive(pid peer.ID)
- func (p *Peers) IsBadPeer(pid peer.ID) bool
- func (p *Peers) IsPeerAvaiable(pid peer.ID) bool
- func (p *Peers) PeerDoRequest(pid peer.ID)
- func (p *Peers) PeerFinishRequest(pid peer.ID)
- func (p *Peers) Penalize(pid peer.ID)
Constants ¶
View Source
const ( DefaultMaxPeers = 33 MaxBadResponses = 50 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Peers ¶
type Peers struct {
// contains filtered or unexported fields
}
func (*Peers) BanBadPeer ¶
func (*Peers) DisconnectPeer ¶
func (*Peers) IsPeerAvaiable ¶
IsPeerAvaiable returns if the peer is in cooldown or is being requested already .
func (*Peers) PeerDoRequest ¶
PeerDoRequest signals that the peer is doing a request.
func (*Peers) PeerFinishRequest ¶
PeerFinishRequest signals that the peer is done doing a request.
Click to show internal directories.
Click to hide internal directories.