client

package
v1.0.0-a1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToPeer

func ConnectToPeer(ctx context.Context, p2phost host.Host, hostRouting routing.PeerRouting, peerID peer.ID) (err error)

func CreateLibp2pHost

func CreateLibp2pHost(ctx context.Context, tcpPort int, listen bool, psk []byte, libp2pPrivKey crypto.PrivKey, relays []peer.AddrInfo) (p2phost host.Host, peerRouting routing.PeerRouting, err error)

CreateLibp2pHost creates a libp2p host with a dht in server mode to the bootstrap nodes listen idicates wether or not a tcpport should be opened for the host to listen on. If privateKey is nil, a libp2p host is started without a predefined peerID

Types

This section is empty.

Jump to

Keyboard shortcuts

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