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/RTradeLtd/libp2px-core/peerstore.PermanentAddrTTL instead. PermanentAddrTTL = core.PermanentAddrTTL // Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.ConnectedAddrTTL instead. ConnectedAddrTTL = core.ConnectedAddrTTL )
Variables ¶
View Source
var ( // Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.AddressTTL instead. AddressTTL = core.AddressTTL // Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.TempAddrTTL instead. TempAddrTTL = core.TempAddrTTL // Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.ProviderAddrTTL instead. ProviderAddrTTL = core.ProviderAddrTTL // Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.RecentlyConnectedAddrTTL instead. RecentlyConnectedAddrTTL = core.RecentlyConnectedAddrTTL // Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.OwnObservedAddrTTL instead. OwnObservedAddrTTL = core.OwnObservedAddrTTL )
View Source
var ErrInvalidAddr = core.ErrInvalidAddr
Deprecated: use github.com/RTradeLtd/libp2px-core/peer.ErrInvalidAddr instead.
View Source
var ErrNotFound = core.ErrNotFound
Deprecated: use github.com/RTradeLtd/libp2px-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
Types ¶
type PeerMetadata
deprecated
type PeerMetadata = core.PeerMetadata
Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.PeerMetadata instead.
Click to show internal directories.
Click to hide internal directories.