package
0.0.0-20190407150747-8b9b72514244
Repository: https://github.com/ipsn/go-ipfs.git
Documentation: pkg.go.dev

# README

go-libp2p-peerstore

GoDoc Coverage Status Build Status

An object to manage peers, their addresses, and other metadata about them.

Install

go get github.com/libp2p/go-libp2p-peerstore

Usage

Check out the GoDocs.

Contribute

Feel free to join in. All welcome. Open an issue!

This repository falls under the IPFS Code of Conduct.

Want to hack on IPFS?

License

MIT

# Packages

Package addr provides utility functions to handle peer addresses.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

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

# Constants

ConnectedAddrTTL is the ttl used for the addresses of a peer to whom we're connected directly.
PermanentAddrTTL is the ttl for a "permanent address" (e.g.

# Variables

AddressTTL is the expiration time of addresses.
No description provided by the author
No description provided by the author
LatencyEWMASmooting governs the decay of the EWMA (the speed at which it changes).
OwnObservedAddrTTL is used for our own external addresses observed by peers.
ProviderAddrTTL is the TTL of an address we've received from a provider.
RecentlyConnectedAddrTTL is used when we recently connected to a peer.
TempAddrTTL is the ttl used for a short lived address.

# Structs

PeerInfo is a small struct used to pass around a peer with a set of addresses (and later, keys?).

# Interfaces

AddrBook holds the multiaddrs of peers.
KeyBook tracks the keys of Peers.
Metrics is just an object that tracks metrics across a set of peers.
PeerMetadata can handle values of any type.
Peerstore provides a threadsafe store of Peer related information.