mautil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0, MIT Imports: 4 Imported by: 5

Documentation

Overview

Package mautil provides multiaddr utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterPrivateIPs

func FilterPrivateIPs(maddrs []multiaddr.Multiaddr) []multiaddr.Multiaddr

FilterPrivateIPs returns a new slice of multiaddrs with any private, loopback, or unspecified IP multiaddrs removed. If no multiaddrs are removed, then returns the original slice.

func FindHTTPAddrs

func FindHTTPAddrs(maddrs []multiaddr.Multiaddr) []multiaddr.Multiaddr

func MultiaddrStringToNetAddr

func MultiaddrStringToNetAddr(maddrStr string) (net.Addr, error)

func ParsePeers

func ParsePeers(addrs []string) ([]peer.AddrInfo, error)

ParsePeers parses a list of multiaddr strings into a list of AddrInfo.

func StringsToMultiaddrs

func StringsToMultiaddrs(addrs []string) ([]multiaddr.Multiaddr, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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