Documentation ¶
Index ¶
- Constants
- type Resolver
- func (r *Resolver) AddHost(hostName string)
- func (r *Resolver) DelHost(hostName string)
- func (r *Resolver) Dump(w io.Writer)
- func (r *Resolver) DumpPrefix(w io.Writer, prefix string)
- func (r *Resolver) GetIPs(hostName string) ([]net.IP, []net.IP)
- func (r *Resolver) GetIPsStr(hostName string) ([]string, []string)
- func (r *Resolver) GetNextIP(hostName string) string
- func (r *Resolver) GetNextIP6(hostName string) string
- func (r *Resolver) GetNextIP6WithIdx(hostName string) (string, int)
- func (r *Resolver) GetNextIPWithIdx(hostName string) (string, int)
- func (r *Resolver) LookupSRV(service, proto, name string) (string, []*net.SRV, error)
- func (r *Resolver) Stop()
- func (r *Resolver) UpdateHostsFromMaping(mapping map[string]map[string][]string)
- func (r *Resolver) WithNameservers(nameServers ...string) *Resolver
Constants ¶
View Source
const ( V4key = "ipv4" V6key = "ipv6" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶ added in v1.1.0
type Resolver struct {
// contains filtered or unexported fields
}
Resolver ...
func (*Resolver) DelHost ¶ added in v1.1.0
DelHost deletes a host with name hostName from maintaining
func (*Resolver) DumpPrefix ¶ added in v1.1.0
DumpPrefix dumps with prefix into writer all hosts with theirs ips
func (*Resolver) GetNextIP ¶ added in v1.1.0
GetNextIP returns next IPv4 for host with name hostName
func (*Resolver) GetNextIP6 ¶ added in v1.1.0
GetNextIP6 returns next IPv6 for host with name hostName
func (*Resolver) GetNextIP6WithIdx ¶ added in v1.1.0
GetNextIP6WithIdx returns next IPv6 and index for host with name hostName
func (*Resolver) GetNextIPWithIdx ¶ added in v1.1.0
GetNextIPWithIdx returns next IPv4 and index for host with name hostName
func (*Resolver) LookupSRV ¶ added in v1.1.0
LookupSRV makes LookupSRV request to one of nameserver passed to WithNameservers
func (*Resolver) Stop ¶ added in v1.1.0
func (r *Resolver) Stop()
Stop - stops maintaining for all hosts
func (*Resolver) UpdateHostsFromMaping ¶ added in v1.1.1
func (*Resolver) WithNameservers ¶ added in v1.1.0
WithNameservers - sets nameservers to resolve hosts
Click to show internal directories.
Click to hide internal directories.