libp2p

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDummyHost

func NewDummyHost(numericID int, sourceAddr t.NodeAddress) host.Host

NewDummyHost creates an insecure libp2p host for test and demonstration purposes.

func NewDummyHostAddr

func NewDummyHostAddr(id, basePort int) multiaddr.Multiaddr

NewDummyHostAddr generates a libp2p host address for test and demonstration purposes.

func NewDummyHostKey

func NewDummyHostKey(numericID int) libp2pcrypto.PrivKey

func NewDummyHostNoListen added in v0.2.2

func NewDummyHostNoListen(numericID int, _ t.NodeAddress) host.Host

NewDummyHostNoListen creates an insecure libp2p host for test and demonstration purposes without listening interface.

func NewDummyHostWithPrivKey

func NewDummyHostWithPrivKey(listenAddr t.NodeAddress, privKey libp2pcrypto.PrivKey) (host.Host, error)

NewDummyHostWithPrivKey creates new dummy libp2p host with an identity determined by the private key given as an input.

func NewDummyMultiaddr

func NewDummyMultiaddr(numericID int, sourceAddr t.NodeAddress) multiaddr.Multiaddr

NewDummyMultiaddr generates a libp2p peer multiaddress for the host generated by NewDummyHost(id, basePort).

func NewFakeMultiaddr

func NewFakeMultiaddr(numericID, port int) multiaddr.Multiaddr

NewFakeMultiaddr generates a libp2p peer multiaddress for a non existed host.

func NewFreeHostAddr

func NewFreeHostAddr() (m multiaddr.Multiaddr)

Types

This section is empty.

Jump to

Keyboard shortcuts

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