Documentation ¶
Index ¶
- func NewWakuPeerstore(p peerstore.Peerstore) peerstore.Peerstore
- type ConnectionFailures
- type Origin
- type WakuPeerstore
- type WakuPeerstoreImpl
- func (ps *WakuPeerstoreImpl) AddAddr(p peer.ID, addr ma.Multiaddr, ttl time.Duration)
- func (ps *WakuPeerstoreImpl) AddAddrs(p peer.ID, addrs []ma.Multiaddr, ttl time.Duration)
- func (ps *WakuPeerstoreImpl) AddConnFailure(p peer.AddrInfo)
- func (ps *WakuPeerstoreImpl) AddPrivKey(p peer.ID, privk ic.PrivKey) error
- func (ps *WakuPeerstoreImpl) AddProtocols(p peer.ID, proto ...protocol.ID) error
- func (ps *WakuPeerstoreImpl) AddPubKey(p peer.ID, pubk ic.PubKey) error
- func (ps *WakuPeerstoreImpl) AddrStream(ctx context.Context, p peer.ID) <-chan ma.Multiaddr
- func (ps *WakuPeerstoreImpl) Addrs(p peer.ID) []ma.Multiaddr
- func (ps *WakuPeerstoreImpl) ClearAddrs(p peer.ID)
- func (ps *WakuPeerstoreImpl) Close() error
- func (ps *WakuPeerstoreImpl) ConnFailures(p peer.AddrInfo) int
- func (ps *WakuPeerstoreImpl) ConsumePeerRecord(s *record.Envelope, ttl time.Duration) (accepted bool, err error)
- func (ps *WakuPeerstoreImpl) ENR(p peer.ID, origin Origin) (*enode.Node, error)
- func (ps *WakuPeerstoreImpl) FirstSupportedProtocol(p peer.ID, proto ...protocol.ID) (protocol.ID, error)
- func (ps *WakuPeerstoreImpl) Get(p peer.ID, key string) (interface{}, error)
- func (ps *WakuPeerstoreImpl) GetPeerRecord(p peer.ID) *record.Envelope
- func (ps *WakuPeerstoreImpl) GetProtocols(p peer.ID) ([]protocol.ID, error)
- func (ps *WakuPeerstoreImpl) LatencyEWMA(p peer.ID) time.Duration
- func (ps *WakuPeerstoreImpl) Origin(p peer.ID, origin Origin) (Origin, error)
- func (ps *WakuPeerstoreImpl) PeerInfo(peerID peer.ID) peer.AddrInfo
- func (ps *WakuPeerstoreImpl) Peers() peer.IDSlice
- func (ps *WakuPeerstoreImpl) PeersByOrigin(origin Origin) peer.IDSlice
- func (ps *WakuPeerstoreImpl) PeersWithAddrs() peer.IDSlice
- func (ps *WakuPeerstoreImpl) PeersWithKeys() peer.IDSlice
- func (ps *WakuPeerstoreImpl) PrivKey(p peer.ID) ic.PrivKey
- func (ps *WakuPeerstoreImpl) PubKey(p peer.ID) ic.PubKey
- func (ps *WakuPeerstoreImpl) Put(p peer.ID, key string, val interface{}) error
- func (ps *WakuPeerstoreImpl) RecordLatency(p peer.ID, t time.Duration)
- func (ps *WakuPeerstoreImpl) RemovePeer(p peer.ID)
- func (ps *WakuPeerstoreImpl) RemoveProtocols(p peer.ID, proto ...protocol.ID) error
- func (ps *WakuPeerstoreImpl) ResetConnFailures(p peer.AddrInfo)
- func (ps *WakuPeerstoreImpl) SetAddr(p peer.ID, addr ma.Multiaddr, ttl time.Duration)
- func (ps *WakuPeerstoreImpl) SetAddrs(p peer.ID, addrs []ma.Multiaddr, ttl time.Duration)
- func (ps *WakuPeerstoreImpl) SetENR(p peer.ID, enr *enode.Node) error
- func (ps *WakuPeerstoreImpl) SetOrigin(p peer.ID, origin Origin) error
- func (ps *WakuPeerstoreImpl) SetProtocols(p peer.ID, proto ...protocol.ID) error
- func (ps *WakuPeerstoreImpl) SupportsProtocols(p peer.ID, proto ...protocol.ID) ([]protocol.ID, error)
- func (ps *WakuPeerstoreImpl) UpdateAddrs(p peer.ID, oldTTL time.Duration, newTTL time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionFailures ¶
type WakuPeerstore ¶
type WakuPeerstore interface { SetOrigin(p peer.ID, origin Origin) error Origin(p peer.ID, origin Origin) (Origin, error) PeersByOrigin(origin Origin) peer.IDSlice SetENR(p peer.ID, enr *enode.Node) error ENR(p peer.ID, origin Origin) (*enode.Node, error) AddConnFailure(p peer.AddrInfo) ResetConnFailures(p peer.AddrInfo) ConnFailures(p peer.AddrInfo) int }
type WakuPeerstoreImpl ¶
type WakuPeerstoreImpl struct {
// contains filtered or unexported fields
}
func (*WakuPeerstoreImpl) AddConnFailure ¶
func (ps *WakuPeerstoreImpl) AddConnFailure(p peer.AddrInfo)
func (*WakuPeerstoreImpl) AddPrivKey ¶
func (*WakuPeerstoreImpl) AddProtocols ¶
func (*WakuPeerstoreImpl) AddrStream ¶
func (*WakuPeerstoreImpl) ClearAddrs ¶
func (ps *WakuPeerstoreImpl) ClearAddrs(p peer.ID)
func (*WakuPeerstoreImpl) Close ¶
func (ps *WakuPeerstoreImpl) Close() error
func (*WakuPeerstoreImpl) ConnFailures ¶
func (ps *WakuPeerstoreImpl) ConnFailures(p peer.AddrInfo) int
func (*WakuPeerstoreImpl) ConsumePeerRecord ¶
func (*WakuPeerstoreImpl) FirstSupportedProtocol ¶
func (*WakuPeerstoreImpl) Get ¶
func (ps *WakuPeerstoreImpl) Get(p peer.ID, key string) (interface{}, error)
func (*WakuPeerstoreImpl) GetPeerRecord ¶
func (ps *WakuPeerstoreImpl) GetPeerRecord(p peer.ID) *record.Envelope
GetPeerRecord returns a Envelope containing a PeerRecord for the given peer id, if one exists. Returns nil if no signed PeerRecord exists for the peer.
func (*WakuPeerstoreImpl) GetProtocols ¶
func (*WakuPeerstoreImpl) LatencyEWMA ¶
func (ps *WakuPeerstoreImpl) LatencyEWMA(p peer.ID) time.Duration
func (*WakuPeerstoreImpl) PeerInfo ¶
func (ps *WakuPeerstoreImpl) PeerInfo(peerID peer.ID) peer.AddrInfo
func (*WakuPeerstoreImpl) Peers ¶
func (ps *WakuPeerstoreImpl) Peers() peer.IDSlice
func (*WakuPeerstoreImpl) PeersByOrigin ¶
func (ps *WakuPeerstoreImpl) PeersByOrigin(origin Origin) peer.IDSlice
func (*WakuPeerstoreImpl) PeersWithAddrs ¶
func (ps *WakuPeerstoreImpl) PeersWithAddrs() peer.IDSlice
func (*WakuPeerstoreImpl) PeersWithKeys ¶
func (ps *WakuPeerstoreImpl) PeersWithKeys() peer.IDSlice
func (*WakuPeerstoreImpl) Put ¶
func (ps *WakuPeerstoreImpl) Put(p peer.ID, key string, val interface{}) error
func (*WakuPeerstoreImpl) RecordLatency ¶
func (ps *WakuPeerstoreImpl) RecordLatency(p peer.ID, t time.Duration)
func (*WakuPeerstoreImpl) RemovePeer ¶
func (ps *WakuPeerstoreImpl) RemovePeer(p peer.ID)
func (*WakuPeerstoreImpl) RemoveProtocols ¶
func (*WakuPeerstoreImpl) ResetConnFailures ¶
func (ps *WakuPeerstoreImpl) ResetConnFailures(p peer.AddrInfo)
func (*WakuPeerstoreImpl) SetOrigin ¶
func (ps *WakuPeerstoreImpl) SetOrigin(p peer.ID, origin Origin) error
func (*WakuPeerstoreImpl) SetProtocols ¶
func (*WakuPeerstoreImpl) SupportsProtocols ¶
func (*WakuPeerstoreImpl) UpdateAddrs ¶
Click to show internal directories.
Click to hide internal directories.