- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for msgUnPath (0.1 sec)
-
internal/config/dns/dns_path.go
func dnsJoin(labels ...string) string { ll := len(labels) if labels[ll-1] == "." { return strings.Join(labels[:ll-1], ".") + "." } return dns.Fqdn(strings.Join(labels, ".")) } // msgUnPath converts a etcd path to domainName. func msgUnPath(s string) string { l := strings.Split(s, etcdPathSeparator) if l[len(l)-1] == "" { l = l[:len(l)-1] } // start with 1, to strip /skydns for i, j := 1, len(l)-1; i < j; i, j = i+1, j-1 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 15:03:08 UTC 2024 - 1.9K bytes - Viewed (0) -
internal/config/dns/etcd_dns_test.go
} } } func TestUnPath(t *testing.T) { result1 := msgUnPath("/skydns/local/cluster/staging/service/") if result1 != "service.staging.cluster.local." { t.Errorf("Failure to get domain from etcd key (with a trailing '/'), expect: 'service.staging.cluster.local.', actually get: '%s'", result1) } result2 := msgUnPath("/skydns/local/cluster/staging/service") if result2 != "service.staging.cluster.local." {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 15:03:08 UTC 2024 - 2.1K bytes - Viewed (0) -
internal/config/dns/etcd_dns.go
// /skydns/net/miniocloud/10.0.0.1 that may exist as // dns entry for the server (rather than the bucket // itself). if srvRecord.Key == "" { continue } srvRecord.Key = msgUnPath(srvRecord.Key) srvRecords = append(srvRecords, srvRecord) } sort.Slice(srvRecords, func(i int, j int) bool { return srvRecords[i].Key < srvRecords[j].Key }) return srvRecords, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 15:03:08 UTC 2024 - 8K bytes - Viewed (0)