pstoremem

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2022 License: MIT Imports: 3 Imported by: 95

Documentation

Overview

Deprecated: This package has moved into go-libp2p as a sub-package: github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddrBook deprecated

func NewAddrBook() pstore.AddrBook

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.NewAddrBook instead

func NewKeyBook deprecated

func NewKeyBook() pstore.KeyBook

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.NewKeyBook instead

func NewPeerMetadata deprecated

func NewPeerMetadata() pstore.PeerMetadata

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.NewPeerMetadata instead

func NewPeerstore

func NewPeerstore(opts ...Option) (ps peerstore.Peerstore, err error)

NewPeerstore creates an in-memory threadsafe collection of peers. It's the caller's responsibility to call RemovePeer to ensure that memory consumption of the peerstore doesn't grow unboundedly. Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.NewPeerstore instead

func NewProtoBook deprecated added in v0.0.6

func NewProtoBook(opts ...ProtoBookOption) (pstore.ProtoBook, error)

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.NewProtoBook instead

Types

type AddrBookOption deprecated added in v0.7.0

type AddrBookOption = pstoremem.AddrBookOption

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.AddrBookOption instead

func WithClock deprecated added in v0.7.0

func WithClock(clock clock) AddrBookOption

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.WithClock instead

type AddrSubManager

type AddrSubManager = pstoremem.AddrSubManager

An abstracted, pub-sub manager for address streams. Extracted from memoryAddrBook in order to support additional implementations. Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.AddrSubManager instead

func NewAddrSubManager

func NewAddrSubManager() *AddrSubManager

NewAddrSubManager initializes an AddrSubManager. Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.NewAddrSubManager instead

type Option deprecated added in v0.4.0

type Option = pstoremem.Option

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.Option instead

type ProtoBookOption deprecated added in v0.5.0

type ProtoBookOption = pstoremem.ProtoBookOption

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.ProtoBookOption instead

func WithMaxProtocols deprecated added in v0.4.0

func WithMaxProtocols(num int) ProtoBookOption

Deprecated: use github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem.WithMaxProtocols instead

Jump to

Keyboard shortcuts

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