MCPcopy Index your code
hub / github.com/AdguardTeam/dnsproxy / newCustomUpstreamConfig

Function newCustomUpstreamConfig

proxy/proxy_test.go:28–35  ·  view source on GitHub ↗

newCustomUpstreamConfig is a helper function that returns an initialized [*proxy.CustomUpstreamConfig].

(ups upstream.Upstream, enabled bool)

Source from the content-addressed store, hash-verified

26// newCustomUpstreamConfig is a helper function that returns an initialized
27// [*proxy.CustomUpstreamConfig].
28func newCustomUpstreamConfig(ups upstream.Upstream, enabled bool) (c *proxy.CustomUpstreamConfig) {
29 return proxy.NewCustomUpstreamConfig(
30 &proxy.UpstreamConfig{Upstreams: []upstream.Upstream{ups}},
31 enabled,
32 0,
33 false,
34 )
35}
36
37// isCachedWithCustomConfig is a helper function that returns the caching
38// results of a constructed request using the provided custom upstream

Callers 1

TestProxy_Resolve_cacheFunction · 0.85

Calls 1

NewCustomUpstreamConfigFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…