coredns/middleware/kubernetes/autopath/cname.go
Miek Gieben 760e667063 middleware/kubernetes: autopath in sub package (#848)
Put the autopath stuff in a separate sub package. Tests are still
included in the main kubernetes directory.

Next steps (after this is merged), is pulling the autopath handling
into the subpackage and fixing the tests.
2017-08-07 07:09:32 -07:00

10 lines
317 B
Go

package autopath
import "github.com/miekg/dns"
// CNAME returns a new CNAME formed from name target and ttl.
func CNAME(name string, target string, ttl uint32) *dns.CNAME {
return &dns.CNAME{
Hdr: dns.RR_Header{Name: name, Rrtype: dns.TypeCNAME, Class: dns.ClassINET, Ttl: ttl},
Target: dns.Fqdn(target)}
}