dns

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() (*dns.ClientConfig, error)

DefaultConfig get the local dns server

func DialContext

func DialContext() func(ctx context.Context, network, addr string) (net.Conn, error)

DialContext return a DialContext function for http.Transport, using the local resolver

func DialContextAt

func DialContextAt(servers []string, host string) func(ctx context.Context, network, addr string) (net.Conn, error)

DialContextAt return a DialContext function for http.Transport, using the given resolvers

func LookupIP

func LookupIP(host string, ipv6 ...bool) ([]string, error)

LookupIP looks up host using the local resolver. It returns a slice of that host's IPv4 and IPv6 addresses.

func LookupIPAt

func LookupIPAt(servers []string, host string, ipv6 ...bool) ([]string, error)

LookupIPAt looks up host using the given resolvers. It returns a slice of that host's IPv4 and IPv6 addresses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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