MCPcopy
hub / github.com/AdguardTeam/dnsproxy / LookupNetIP

Method LookupNetIP

internal/bootstrap/resolver.go:20–20  ·  view source on GitHub ↗

LookupNetIP looks up the IP addresses for the given host. network should be one of [NetworkIP], [NetworkIP4] or [NetworkIP6]. The response may be empty even if err is nil. All the addrs must be valid.

(ctx context.Context, network Network, host string)

Source from the content-addressed store, hash-verified

18 // be one of [NetworkIP], [NetworkIP4] or [NetworkIP6]. The response may be
19 // empty even if err is nil. All the addrs must be valid.
20 LookupNetIP(ctx context.Context, network Network, host string) (addrs []netip.Addr, err error)
21}
22
23// type check

Callers 7

TestLookupNetIPFunction · 0.65
ResolveDialContextFunction · 0.65
TestLookupParallelFunction · 0.65
LookupNetIPMethod · 0.65
lookupAsyncFunction · 0.65
LookupNetIPMethod · 0.65

Implementers 5

CachingResolverupstream/resolver.go
UpstreamResolverupstream/resolver.go
HostsResolverupstream/hostsresolver.go
Proxyproxy/proxy.go
testResolverinternal/bootstrap/resolver_test.go

Calls

no outgoing calls

Tested by 3

TestLookupNetIPFunction · 0.52
TestLookupParallelFunction · 0.52