go-libp2p-peerstore: github.com/libp2p/go-libp2p-peerstore Index | Files | Directories

package peerstore

import "github.com/libp2p/go-libp2p-peerstore"

Index

Package Files

interface.go metrics.go peerinfo.go peerstore.go

Constants

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

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.

func InfoFromP2pAddr Uses

func InfoFromP2pAddr(m ma.Multiaddr) (*core.AddrInfo, error)

Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoFromP2pAddr instead.

func InfoToP2pAddrs Uses

func InfoToP2pAddrs(pi *core.AddrInfo) ([]ma.Multiaddr, error)

Deprecated: use github.com/libp2p/go-libp2p-core/peer.AddrInfoToP2pAddrs instead.

func NewMetrics Uses

func NewMetrics() *metrics

func NewPeerstore Uses

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.

func PeerInfoIDs Uses

func PeerInfoIDs(pis []peer.AddrInfo) peer.IDSlice

func PeerInfos Uses

func PeerInfos(ps pstore.Peerstore, peers peer.IDSlice) []peer.AddrInfo

type AddrBook Uses

type AddrBook = core.AddrBook

Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.AddrBook instead.

type KeyBook Uses

type KeyBook = core.KeyBook

Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.KeyBook instead.

type Metrics Uses

type Metrics = core.Metrics

Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.Metrics instead.

type PeerInfo Uses

type PeerInfo = core.AddrInfo

Deprecated: use github.com/libp2p/go-libp2p-core/peer.Info instead.

type PeerMetadata Uses

type PeerMetadata = core.PeerMetadata

Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.PeerMetadata instead.

type Peerstore Uses

type Peerstore = core.Peerstore

Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.Peerstore instead.

type ProtoBook Uses

type ProtoBook = core.ProtoBook

Deprecated: use github.com/libp2p/go-libp2p-core/peerstore.ProtoBook instead.

Directories

PathSynopsis
addrPackage 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.