package
0.0.0-20220412220916-5ea02083e3ec
Repository: https://github.com/riteshrch/go-edge-device-lib.git
Documentation: pkg.go.dev

# Functions

AddrMatch returns the Multiaddrs that match the protocol stack on addr.
Dial connects to a remote address.
DialArgs is a convenience function that returns network and address as expected by net.Dial.
FromIP converts a net.IP type to a Multiaddr.
No description provided by the author
FromNetAddr converts a net.Addr type to a Multiaddr.
InterfaceMultiaddrs will return the addresses matching net.InterfaceAddrs.
IsIP6LinkLocal returns whether a Multiaddr starts with an IPv6 link-local multiaddress (with zero or one leading zone).
IsIPLoopback returns whether a Multiaddr starts with a "Loopback" IP address This means either /ip4/127.*.*.*/*, /ip6/::1/*, or /ip6/::ffff:127.*.*.*.*/*, or /ip6zone/<any value>/ip6/<one of the preceding ip6 values>/*.
IsIPUnspecified returns whether a Multiaddr starts with an Unspecified IP address This means either /ip4/0.0.0.0/* or /ip6/::/*.
IsPrivateAddr returns true if the IP part of the mutiaddr is in a private network.
IsPublicAddr retruns true if the IP part of the multiaddr is a publicly routable address.
IsThinWaist returns whether a Multiaddr starts with "Thin Waist" Protocols.
Listen announces on the local network address laddr.
ListenPacket announces on the local network address laddr.
NetListener turns this Listener into a net.Listener.
NewCodecMap initializes and returns a CodecMap object.
RegisterFromNetAddr registers a conversion from net.Addr instances to multiaddrs.
RegisterToNetAddr registers a conversion from multiaddrs to net.Addr instances.
ResolveUnspecifiedAddress expands an unspecified ip addresses (/ip4/0.0.0.0, /ip6/::) to use the known local interfaces.
ResolveUnspecifiedAddresses expands unspecified ip addresses (/ip4/0.0.0.0, /ip6/::) to use the known local interfaces.
ToIP converts a Multiaddr to a net.IP when possible.
ToNetAddr converts a Multiaddr to a net.Addr Must be ThinWaist.
WrapNetConn wraps a net.Conn object with a Multiaddr friendly Conn.
WrapNetListener wraps a net.Listener with a manet.Listener.
WrapPacketConn wraps a net.PacketConn with a manet.PacketConn.

# Variables

IP4Loopback is the ip4 loopback multiaddr.
IP4MappedIP6Loopback is the IPv4 Mapped IPv6 loopback address.
Unspecified Addresses (used for ).
IP6Loopback is the ip6 loopback multiaddr.
Unspecified Addresses (used for ).
Private4 and Private6 are well-known private networks.
Private4 and Private6 are well-known private networks.
Unroutable4 and Unroutable6 are well known unroutable address ranges.
Unroutable4 and Unroutable6 are well known unroutable address ranges.

# Structs

CodecMap holds a map of NetCodecs indexed by their Protocol ID along with parsers for the addresses they use.
Dialer contains options for connecting to an address.

# Interfaces

Conn is the equivalent of a net.Conn object.
A Listener is a generic network listener for stream-oriented protocols.
A PacketConn is a generic packet oriented network connection which uses an underlying net.PacketConn, wrapped with the locally bound Multiaddr.

# Type aliases

FromNetAddrFunc is a generic function which converts a net.Addr to Multiaddress.
ToNetAddrFunc is a generic function which converts a Multiaddress to net.Addr.