go-libp2p-peerstore/mem/peerstore.go

12 lines
266 B
Go
Raw Normal View History

package mem
import pstore "github.com/libp2p/go-libp2p-peerstore"
// NewPeerstore creates an in-memory threadsafe collection of peers.
func NewPeerstore() pstore.Peerstore {
return pstore.NewPeerstoreWith(
NewKeybook(),
&AddrManager{},
NewPeerMetadata())
}