MCPcopy
hub / github.com/nextdns/nextdns / Resolver

Interface Resolver

resolver/resolver.go:16–25  ·  view source on GitHub ↗

Resolver is an interface to a type that send q to a resolver using a specific transport.

Source from the content-addressed store, hash-verified

14// Resolver is an interface to a type that send q to a resolver using a specific
15// transport.
16type Resolver interface {
17 // Resolve send q and write the response into buf. If buf too small,
18 // response is truncated. It is fine to reuse the same []byte for q.Payload
19 // and buf.
20 //
21 // When caching is enabled, a cached response is returned if a valid entry
22 // is found in the cache for q. In case of err with cache enabled, an
23 // expired fallback entry may be stored in buf. In such case, n is > 0.
24 Resolve(ctx context.Context, q query.Query, buf []byte) (n int, i ResolveInfo, err error)
25}
26
27type Cacher interface {
28 // Get returns the cached value for key. Returned value must be treated as

Callers 4

ResolveMethod · 0.65
ResolveMethod · 0.65
runFunction · 0.95
GetMethod · 0.45

Implementers 2

Proxyproxy/proxy.go
DNSresolver/resolver.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…