Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookupName ¶
LookupName returns a list of SRV records. addrPath is the path to a json file in zk. It can also reference a named port (/zk/cell/zkns/path:_named_port)
Types ¶
type ZknsAddr ¶
type ZknsAddr struct { // These fields came from a Python app originally that used a different // naming convention. Host string `json:"host"` Port int `json:"port,omitempty"` // DEPRECATED NamedPortMap map[string]int `json:"named_port_map"` IPv4 string `json:"ipv4"` // contains filtered or unexported fields }
ZknsAddr represents a variety if different address types, primarily in JSON.
type ZknsAddrs ¶
type ZknsAddrs struct { Entries []ZknsAddr // contains filtered or unexported fields }
ZknsAddrs represents a list of individual entries. SRV records can have multiple endpoints, so this is always a list. A record with one entry and a port number zero is interpreted as a CNAME. A record with one entry, a port number zero and an IP address is interpreted as an A.
func (*ZknsAddrs) IsValidA ¶
IsValidA returns the answer to the eternal question - can this be interpreted as an A record?
func (*ZknsAddrs) IsValidCNAME ¶
IsValidCNAME returns true if this can be interpreted as a CNAME. This method is intentially loose - it allows a SRV record with a single entry to be interpreted as a CNAME.
func (*ZknsAddrs) IsValidSRV ¶
IsValidSRV returns true if this can be interpreted as a SRV record.