Versions in this module Expand all Collapse all v0 v0.38.3 Jan 4, 2024 Changes in this version + const PexChannel + var ErrUnsolicitedList = errors.New("unsolicited pexAddrsMessage") + type AddrBook interface + AddAddress func(addr *p2p.NetAddress, src *p2p.NetAddress) error + AddOurAddress func(*p2p.NetAddress) + AddPrivateIDs func([]string) + Empty func() bool + GetSelection func() []*p2p.NetAddress + GetSelectionWithBias func(biasTowardsNewAddrs int) []*p2p.NetAddress + HasAddress func(*p2p.NetAddress) bool + IsBanned func(*p2p.NetAddress) bool + IsGood func(*p2p.NetAddress) bool + MarkAttempt func(*p2p.NetAddress) + MarkBad func(*p2p.NetAddress, time.Duration) + MarkGood func(p2p.ID) + NeedMoreAddrs func() bool + OurAddress func(*p2p.NetAddress) bool + PickAddress func(biasTowardsNewAddrs int) *p2p.NetAddress + ReinstateBadPeers func() + RemoveAddress func(*p2p.NetAddress) + Save func() + Size func() int + func NewAddrBook(filePath string, routabilityStrict bool) AddrBook + type ErrAddrBookInvalidAddr struct + Addr *p2p.NetAddress + AddrErr error + func (err ErrAddrBookInvalidAddr) Error() string + type ErrAddrBookNilAddr struct + Addr *p2p.NetAddress + Src *p2p.NetAddress + func (err ErrAddrBookNilAddr) Error() string + type ErrAddrBookNonRoutable struct + Addr *p2p.NetAddress + func (err ErrAddrBookNonRoutable) Error() string + type ErrAddrBookPrivate struct + Addr *p2p.NetAddress + func (err ErrAddrBookPrivate) Error() string + func (err ErrAddrBookPrivate) PrivateAddr() bool + type ErrAddrBookPrivateSrc struct + Src *p2p.NetAddress + func (err ErrAddrBookPrivateSrc) Error() string + func (err ErrAddrBookPrivateSrc) PrivateAddr() bool + type ErrAddrBookSelf struct + Addr *p2p.NetAddress + func (err ErrAddrBookSelf) Error() string + type ErrAddressBanned struct + Addr *p2p.NetAddress + func (err ErrAddressBanned) Error() string + type Peer = p2p.Peer + type Reactor struct + func NewReactor(b AddrBook, config *ReactorConfig) *Reactor + func (r *Reactor) AddPeer(p Peer) + func (r *Reactor) AttemptsToDial(addr *p2p.NetAddress) int + func (r *Reactor) GetChannels() []*conn.ChannelDescriptor + func (r *Reactor) OnStart() error + func (r *Reactor) OnStop() + func (r *Reactor) Receive(e p2p.Envelope) + func (r *Reactor) ReceiveAddrs(addrs []*p2p.NetAddress, src Peer) error + func (r *Reactor) RemovePeer(p Peer, _ interface{}) + func (r *Reactor) RequestAddrs(p Peer) + func (r *Reactor) SendAddrs(p Peer, netAddrs []*p2p.NetAddress) + func (r *Reactor) SetEnsurePeersPeriod(d time.Duration) + type ReactorConfig struct + PersistentPeersMaxDialPeriod time.Duration + SeedDisconnectWaitPeriod time.Duration + SeedMode bool + Seeds []string