libp2p

package
v0.3.23 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ContinuouslyConnectPeersLoopDelaySeconds = 10

Variables

This section is empty.

Functions

func ConnectToPeers

func ConnectToPeers(ctx context.Context, h host.Host, peers []multiaddr.Multiaddr) error

func ConnectToPeersContinuously

func ConnectToPeersContinuously(ctx context.Context, cm *system.CleanupManager, h host.Host, peers []multiaddr.Multiaddr) error

func NewHost

func NewHost(port int, opts ...libp2p.Option) (host.Host, error)

NewHost creates a new libp2p host with some default configuration. It will continuously connect to bootstrap peers if they are defined.

func NewHostForTest

func NewHostForTest(ctx context.Context, peers ...host.Host) (host.Host, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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