mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
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.
This commit is contained in:
10
middleware/kubernetes/autopath/cname.go
Normal file
10
middleware/kubernetes/autopath/cname.go
Normal file
@@ -0,0 +1,10 @@
|
||||
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)}
|
||||
}
|
||||
Reference in New Issue
Block a user