Path converts a domainname to an etcd path. If s looks like service.staging.skydns.local.,
the resulting key will be /skydns/local/skydns/staging/service .
As Path, but
if a name contains wildcards (*), the name will be chopped of before the (first) wildcard, and
we do a highler evel search and later find the matching names.
So service.*.skydns.local, will look for all services under skydns.local and will later check
for names that match service.*.skydns.local. If a wildcard is found the returned bool is true.
type Service struct {
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
Priority int `json:"priority,omitempty"`
Weight int `json:"weight,omitempty"`
Ttl uint32 `json:"ttl,omitempty"`
// etcd key where we found this service and ignore from json un-/marshalling Key string `json:"-"`
}
This *is* the rdata from a SRV record, but with a twist.
Host (Target in SRV) must be a domain name, but if it looks like an IP
address (4/6), we will treat it like an IP address.