2019-12-10 02:26:41 +00:00
|
|
|
// +build !consulent
|
|
|
|
|
|
|
|
package agent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/hashicorp/consul/agent/config"
|
|
|
|
"github.com/hashicorp/consul/agent/structs"
|
|
|
|
)
|
|
|
|
|
|
|
|
type enterpriseDNSConfig struct{}
|
|
|
|
|
|
|
|
func getEnterpriseDNSConfig(conf *config.RuntimeConfig) enterpriseDNSConfig {
|
|
|
|
return enterpriseDNSConfig{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (d *DNSServer) parseDatacenterAndEnterpriseMeta(labels []string, _ *dnsConfig, datacenter *string, _ *structs.EnterpriseMeta) bool {
|
|
|
|
switch len(labels) {
|
|
|
|
case 1:
|
|
|
|
*datacenter = labels[0]
|
|
|
|
return true
|
|
|
|
case 0:
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2020-06-24 22:11:01 +00:00
|
|
|
func serviceCanonicalDNSName(name, kind, datacenter, domain string, _ *structs.EnterpriseMeta) string {
|
|
|
|
return fmt.Sprintf("%s.%s.%s.%s", name, kind, datacenter, domain)
|
2019-12-10 02:26:41 +00:00
|
|
|
}
|