commons

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMultiAddress

func BuildMultiAddress(ipAddr, protocol string, port uint, id peer.ID) (ma.Multiaddr, error)

BuildMultiAddress creates a multiaddr from the given peer data

func CheckAddress

func CheckAddress(addr string) error

CheckAddress checks that some address is accessible and returns error accordingly

func EnsureConnectedPeers

func EnsureConnectedPeers(pctx context.Context, h host.Host, n int, timeout time.Duration) error

EnsureConnectedPeers ensures that the host has at least {n} connected peers under the given timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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