Versions in this module Expand all Collapse all v0 v0.23.5 Nov 8, 2022 Changes in this version + const ConnectedAddrTTL + const PermanentAddrTTL + var AddressTTL = time.Hour + var ErrNotFound = errors.New("item not found") + var OwnObservedAddrTTL = time.Minute * 30 + var ProviderAddrTTL = time.Minute * 30 + var RecentlyConnectedAddrTTL = time.Minute * 30 + var TempAddrTTL = time.Minute * 2 + func AddrInfos(ps Peerstore, peers []peer.ID) []peer.AddrInfo + type AddrBook interface + AddAddr func(p peer.ID, addr ma.Multiaddr, ttl time.Duration) + AddAddrs func(p peer.ID, addrs []ma.Multiaddr, ttl time.Duration) + AddrStream func(context.Context, peer.ID) <-chan ma.Multiaddr + Addrs func(p peer.ID) []ma.Multiaddr + ClearAddrs func(p peer.ID) + PeersWithAddrs func() peer.IDSlice + SetAddr func(p peer.ID, addr ma.Multiaddr, ttl time.Duration) + SetAddrs func(p peer.ID, addrs []ma.Multiaddr, ttl time.Duration) + UpdateAddrs func(p peer.ID, oldTTL time.Duration, newTTL time.Duration) + type CertifiedAddrBook interface + ConsumePeerRecord func(s *record.Envelope, ttl time.Duration) (accepted bool, err error) + GetPeerRecord func(p peer.ID) *record.Envelope + func GetCertifiedAddrBook(ab AddrBook) (cab CertifiedAddrBook, ok bool) + type KeyBook interface + AddPrivKey func(peer.ID, ic.PrivKey) error + AddPubKey func(peer.ID, ic.PubKey) error + PeersWithKeys func() peer.IDSlice + PrivKey func(peer.ID) ic.PrivKey + PubKey func(peer.ID) ic.PubKey + RemovePeer func(peer.ID) + type Metrics interface + LatencyEWMA func(peer.ID) time.Duration + RecordLatency func(peer.ID, time.Duration) + RemovePeer func(peer.ID) + type PeerMetadata interface + Get func(p peer.ID, key string) (interface{}, error) + Put func(p peer.ID, key string, val interface{}) error + RemovePeer func(peer.ID) + type Peerstore interface + PeerInfo func(peer.ID) peer.AddrInfo + Peers func() peer.IDSlice + type ProtoBook interface + AddProtocols func(peer.ID, ...string) error + FirstSupportedProtocol func(peer.ID, ...string) (string, error) + GetProtocols func(peer.ID) ([]string, error) + RemovePeer func(peer.ID) + RemoveProtocols func(peer.ID, ...string) error + SetProtocols func(peer.ID, ...string) error + SupportsProtocols func(peer.ID, ...string) ([]string, error)