MCPcopy
hub / github.com/grafana/dskit / newMockClient

Function newMockClient

dns/miekgdns/resolver_test.go:362–367  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

360}
361
362func newMockClient() *mockClient {
363 return &mockClient{
364 err: make(map[string]error),
365 res: make(map[string][]*dns.Msg),
366 }
367}
368
369func (m *mockClient) Exchange(_ context.Context, _ *dns.Msg, server string) (*dns.Msg, time.Duration, error) {
370 if err, ok := m.err[server]; ok {

Callers 3

TestResolver_LookupSRVFunction · 0.85
TestResolver_LookupIPFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected