utils

package
v0.0.0-...-57c47fe Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IDLength = 16

IDLength is here as a variable so that it can be decreased for tests with mocknet where IDs are way shorter. The call to FmtPeerID would panic if this value stayed at 16.

Functions

func FilterPrivateMaddrs

func FilterPrivateMaddrs(pi peer.AddrInfo) peer.AddrInfo

FilterPrivateMaddrs strips private multiaddrs from the given peer address information.

func FmtPeerID

func FmtPeerID(id peer.ID) string

func IsResourceLimitExceeded

func IsResourceLimitExceeded(err error) bool

func MaddrsToAddrs

func MaddrsToAddrs(maddrs []ma.Multiaddr) []string

MaddrsToAddrs maps a slice of multi addresses to their string representation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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