 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func InfoFromP2pAddr(m ma.Multiaddr) (*core.AddrInfo, error)deprecated
- func InfoToP2pAddrs(pi *core.AddrInfo) ([]ma.Multiaddr, error)deprecated
- func NewMetrics() *metrics
- func NewPeerstore(kb pstore.KeyBook, ab pstore.AddrBook, pb pstore.ProtoBook, ...) pstore.Peerstore
- func PeerInfoIDs(pis []peer.AddrInfo) peer.IDSlice
- func PeerInfos(ps pstore.Peerstore, peers peer.IDSlice) []peer.AddrInfo
- type AddrBookdeprecated
- type KeyBookdeprecated
- type Metricsdeprecated
- type PeerInfodeprecated
- type PeerMetadatadeprecated
- type Peerstoredeprecated
- type ProtoBookdeprecated
Constants ¶
      View Source
      
  
const ( // Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.PermanentAddrTTL instead. PermanentAddrTTL = core.PermanentAddrTTL // Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.ConnectedAddrTTL instead. ConnectedAddrTTL = core.ConnectedAddrTTL )
Variables ¶
      View Source
      
  
    var ( // Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.AddressTTL instead. AddressTTL = core.AddressTTL // Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.TempAddrTTL instead. TempAddrTTL = core.TempAddrTTL // Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.ProviderAddrTTL instead. ProviderAddrTTL = core.ProviderAddrTTL // Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.RecentlyConnectedAddrTTL instead. RecentlyConnectedAddrTTL = core.RecentlyConnectedAddrTTL // Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.OwnObservedAddrTTL instead. OwnObservedAddrTTL = core.OwnObservedAddrTTL )
      View Source
      
  var ErrInvalidAddr = core.ErrInvalidAddr
    Deprecated: use github.com/libp2p/go-libp2p-core/peer.ErrInvalidAddr instead.
      View Source
      
  var ErrNotFound = core.ErrNotFound
    Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.ErrNotFound instead.
      View Source
      
  var LatencyEWMASmoothing = 0.1
    LatencyEWMASmooting governs the decay of the EWMA (the speed at which it changes). This must be a normalized (0-1) value. 1 is 100% change, 0 is no change.
Functions ¶
func NewMetrics ¶
func NewMetrics() *metrics
func NewPeerstore ¶
func NewPeerstore(kb pstore.KeyBook, ab pstore.AddrBook, pb pstore.ProtoBook, md pstore.PeerMetadata) pstore.Peerstore
NewPeerstore creates a data structure that stores peer data, backed by the supplied implementations of KeyBook, AddrBook and PeerMetadata. Deprecated: use pstoreds.NewPeerstore or peerstoremem.NewPeerstore instead.
Types ¶
        
          
            type PeerMetadata
            deprecated
            
          
  
    
  
      
      type PeerMetadata = core.PeerMetadata
Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.PeerMetadata instead.
 Click to show internal directories. 
   Click to hide internal directories. 
