utils

package
v0.0.0-...-7d840d9 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrInfoFilterPrivateMaddrs

func AddrInfoFilterPrivateMaddrs(pi peer.AddrInfo) peer.AddrInfo

AddrInfoFilterPrivateMaddrs strips private multiaddrs from the given peer address information.

func AddrInfoFilterPublicMaddrs

func AddrInfoFilterPublicMaddrs(pi peer.AddrInfo) peer.AddrInfo

AddrInfoFilterPublicMaddrs strips public multiaddrs from the given peer address information.

func AddrsToMaddrs

func AddrsToMaddrs(addrs []string) ([]ma.Multiaddr, error)

AddrsToMaddrs maps a slice of addresses to their multiaddress representation.

func FilterPrivateMaddrs

func FilterPrivateMaddrs(maddrs []ma.Multiaddr) []ma.Multiaddr

FilterPrivateMaddrs strips private multiaddrs from the given peer address information.

func FilterPublicMaddrs

func FilterPublicMaddrs(maddrs []ma.Multiaddr) []ma.Multiaddr

FilterPublicMaddrs strips public multiaddrs from the given peer address information.

func IsResourceLimitExceeded

func IsResourceLimitExceeded(err error) bool

IsResourceLimitExceeded returns true if the given error represents an error related to a limit of the local resource manager.

func MaddrsToAddrs

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

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

func MergeMaddrs

func MergeMaddrs(maddrSet1 []ma.Multiaddr, maddrSet2 []ma.Multiaddr) []ma.Multiaddr

MergeMaddrs takes two slices of multi addresses and merges them into a single one.

func ToEnode

func ToEnode(peerID peer.ID, maddrs []ma.Multiaddr) (*enode.Node, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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