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

Struct Upstream

internal/dnsproxytest/interface.go:13–17  ·  view source on GitHub ↗

Upstream is a mock [upstream.Upstream] implementation for tests. TODO(e.burkov): Move to golibs.

Source from the content-addressed store, hash-verified

11//
12// TODO(e.burkov): Move to golibs.
13type Upstream struct {
14 OnAddress func() (addr string)
15 OnExchange func(req *dns.Msg) (resp *dns.Msg, err error)
16 OnClose func() (err error)
17}
18
19// type check
20var _ upstream.Upstream = (*Upstream)(nil)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected