dns

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultResolver = &Resolver{net.LookupSRV, net.LookupTXT}

DefaultResolver is a Resolver that uses the default Resolver from the net package.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	// Holds the functions to use for DNS lookups
	LookupSRV func(string, string, string) (string, []*net.SRV, error)
	LookupTXT func(string) ([]string, error)
}

Resolver resolves DNS records.

func (*Resolver) GetConnectionArgsFromTXT

func (r *Resolver) GetConnectionArgsFromTXT(host string) ([]string, error)

GetConnectionArgsFromTXT gets the TXT record associated with the host and returns the connection arguments.

func (*Resolver) ParseHosts

func (r *Resolver) ParseHosts(host string, stopOnErr bool) ([]string, error)

ParseHosts uses the srv string to get the hosts.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL