doh

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 13 Imported by: 13

README

go-doh-resolver

DNS over HTTPS resolver

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v0.4.0

type Option func(*Resolver) error

func WithCacheDisabled added in v0.4.0

func WithCacheDisabled() Option

func WithMaxCacheTTL added in v0.4.0

func WithMaxCacheTTL(maxCacheTTL time.Duration) Option

Specifies the maximum time entries are valid in the cache A maxCacheTTL of zero is equivalent to `WithCacheDisabled`

type Resolver

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

func NewResolver

func NewResolver(url string, opts ...Option) (*Resolver, error)

func (*Resolver) LookupIPAddr

func (r *Resolver) LookupIPAddr(ctx context.Context, domain string) (result []net.IPAddr, err error)

func (*Resolver) LookupTXT

func (r *Resolver) LookupTXT(ctx context.Context, domain string) ([]string, error)

Jump to

Keyboard shortcuts

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