resolve

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package resolve is responsible for everything DNS-related in gocurl.

Index

Constants

View Source
const ErrEmptyResponse = errors.Error("empty response")

ErrEmptyResponse means that the response does not contain necessary RRs.

View Source
const ErrInvalidResolver = errors.Error("invalid resolver")

ErrInvalidResolver means that the configured resolver is invalid.

View Source
const ErrNoResolvers = errors.Error("no resolvers")

ErrNoResolvers means that system resolvers couldn't be discovered.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

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

Resolver is a structure that is used whenever DNS resolution is required.

TODO(ameshkov): Add --resolve parameter support.

func NewResolver

func NewResolver(cfg *config.Config, out *output.Output) (r *Resolver, err error)

NewResolver creates a new instance of *Resolver.

func (*Resolver) LookupECHConfigs

func (r *Resolver) LookupECHConfigs(hostname string) (echConfigs []ctls.ECHConfig, err error)

LookupECHConfigs attempts to discover ECH configurations in DNS records of the specified hostname. If no ECH configuration can be discovered for this domain, the function returns ErrEmptyResponse (checked via errors.Is/As).

func (*Resolver) LookupHost

func (r *Resolver) LookupHost(hostname string) (ipAddresses []net.IP, err error)

LookupHost looks up all IP addresses of the hostname.

Jump to

Keyboard shortcuts

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