p2p/host/peerstore/peerstore library

Package peerstore provides utility functions for working with peerstores.

Functions

peerInfoIDs(List<AddrInfo> pis) List<PeerId>
PeerInfoIDs extracts peer IDs from a slice of peer address information.
peerInfos(Peerstore ps, List<PeerId> peers) Future<List<AddrInfo>>
PeerInfos converts a slice of peer IDs to a slice of peer address information using a peerstore.