Versions in this module Expand all Collapse all v1 v1.7.1 Jan 29, 2021 v1.7.0 Dec 8, 2020 Changes in this version + const P_DNS + const P_DNS4 + const P_DNS6 + const P_DNSADDR + var DefaultResolver = &Resolver + var Dns4Protocol = ma.ProtocolWithCode(P_DNS4) + var Dns6Protocol = ma.ProtocolWithCode(P_DNS6) + var DnsProtocol = ma.ProtocolWithCode(P_DNS) + var DnsaddrProtocol = ma.ProtocolWithCode(P_DNSADDR) + var ResolvableProtocols = []ma.Protocol + func Matches(maddr ma.Multiaddr) (matches bool) + func Resolve(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error) + type MockBackend struct + IP map[string][]net.IPAddr + TXT map[string][]string + func (r *MockBackend) LookupIPAddr(ctx context.Context, name string) ([]net.IPAddr, error) + func (r *MockBackend) LookupTXT(ctx context.Context, name string) ([]string, error) + type Resolver struct + Backend backend + func (r *Resolver) Resolve(ctx context.Context, maddr ma.Multiaddr) ([]ma.Multiaddr, error)