client

package
v1.0.0-b3 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToPeer

func ConnectToPeer(ctx context.Context, p2phost *autorelay.AutoRelayHost, hostRouting routing.PeerRouting, relay *peer.AddrInfo, peerID peer.ID) (err error)

func CreateLibp2pHost

func CreateLibp2pHost(ctx context.Context, tcpPort int, listen bool, psk []byte, libp2pPrivKey crypto.PrivKey, relays []peer.AddrInfo) (arhost *autorelay.AutoRelayHost, 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