import "github.com/libp2p/go-libp2p-peerstore"
interface.go metrics.go peerinfo.go peerstore.go
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 )
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 )
var ErrInvalidAddr = core.ErrInvalidAddr
Deprecated: use github.com/libp2p/go-libp2p-core/peer.ErrInvalidAddr instead.
var ErrNotFound = core.ErrNotFound
Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.ErrNotFound instead.
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.
Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoFromP2pAddr instead.
Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoToP2pAddrs instead.
func NewMetrics() *metrics
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 github.com/libp2p/go-libp2p-core/peerstore.AddrBook instead.
Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.KeyBook instead.
Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.Metrics instead.
Deprecated: use github.com/libp2p/go-libp2p-core/peer.Info instead.
type PeerMetadata = core.PeerMetadata
Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.PeerMetadata instead.
Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.Peerstore instead.
Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.ProtoBook instead.
Path | Synopsis |
---|---|
addr | Package addr provides utility functions to handle peer addresses. |
pb | |
pstoreds | |
pstoremem | |
queue | |
test |
Package peerstore imports 7 packages (graph) and is imported by 181 packages. Updated 2019-12-11. Refresh now. Tools for package owners.