peerstore

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2020 License: AGPL-3.0, MIT Imports: 7 Imported by: 0

Documentation

Index

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 InfoFromP2pAddr deprecated

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

Deprecated: use github.com/RTradeLtd/libp2px-core/peer.AddrInfoFromP2pAddr instead.

func InfoToP2pAddrs deprecated

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

Deprecated: use github.com/RTradeLtd/libp2px-core/peer.AddrInfoToP2pAddrs instead.

func NewMetrics

func NewMetrics() *metrics

func NewPeerstore

NewPeerstore creates a data structure that stores peer data, backed by the supplied implementations of KeyBook, AddrBook and PeerMetadata.

func PeerInfoIDs

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

func PeerInfos

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

Types

type AddrBook deprecated

type AddrBook = core.AddrBook

Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.AddrBook instead.

type KeyBook deprecated

type KeyBook = core.KeyBook

Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.KeyBook instead.

type Metrics deprecated

type Metrics = core.Metrics

Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.Metrics instead.

type PeerInfo deprecated

type PeerInfo = core.AddrInfo

Deprecated: use github.com/RTradeLtd/libp2px-core/peer.Info instead.

type PeerMetadata deprecated

type PeerMetadata = core.PeerMetadata

Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.PeerMetadata instead.

type Peerstore deprecated

type Peerstore = core.Peerstore

Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.Peerstore instead.

type ProtoBook deprecated

type ProtoBook = core.ProtoBook

Deprecated: use github.com/RTradeLtd/libp2px-core/peerstore.ProtoBook instead.

Directories

Path Synopsis
Package addr provides utility functions to handle peer addresses.
Package addr provides utility functions to handle peer addresses.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL