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

Struct upstreamWithStats

proxy/stats.go:13–22  ·  view source on GitHub ↗

upstreamWithStats is a wrapper around the [upstream.Upstream] interface that gathers statistics.

Source from the content-addressed store, hash-verified

11// upstreamWithStats is a wrapper around the [upstream.Upstream] interface that
12// gathers statistics.
13type upstreamWithStats struct {
14 // upstream is the upstream DNS resolver.
15 upstream upstream.Upstream
16
17 // err is the DNS lookup error, if any.
18 err error
19
20 // queryDuration is the duration of the successful DNS lookup.
21 queryDuration time.Duration
22}
23
24// type check
25var _ upstream.Upstream = (*upstreamWithStats)(nil)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected