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

Function newCnameDNSResponse

dns/miekgdns/resolver_test.go:434–449  ·  view source on GitHub ↗
(host string, target string)

Source from the content-addressed store, hash-verified

432}
433
434func newCnameDNSResponse(host string, target string) *dns.Msg {
435 request := new(dns.Msg).SetQuestion(host, dns.TypeCNAME)
436 response := new(dns.Msg).SetReply(request)
437 response.Answer = append(response.Answer, &dns.CNAME{
438 Hdr: dns.RR_Header{
439 Name: host,
440 Rrtype: dns.TypeCNAME,
441 Class: dns.ClassINET,
442 Ttl: 30,
443 Rdlength: 4,
444 },
445 Target: target,
446 })
447
448 return response
449}

Callers 1

TestResolver_LookupIPFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected