resolver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a DNS resolver client to resolve hostnames. It caches hostnames according to their TTL values and does refresh only explicitly if another request is made to the domain.

func New

func New(baseResolvers []string, maxRetries int) (*Client, error)

New creates a new dns client

func (*Client) Resolve

func (c *Client) Resolve(host string) (Result, error)

Resolve is the underlying resolve function that actually resolves a host and gets the ip records for that host.

type Result

type Result struct {
	IPs []string
	TTL int
}

Result contains the results from a DNS resolution

Jump to

Keyboard shortcuts

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