resolvers

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEndsWithColon = errors.New("")
)

Functions

This section is empty.

Types

type DNSResolver

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

func (*DNSResolver) Close

func (d *DNSResolver) Close()

func (*DNSResolver) ResolveNow

func (d *DNSResolver) ResolveNow(resolver.ResolveNowOptions)

type DNSResolverBuilder

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

func NewDNSResolverBuilder

func NewDNSResolverBuilder(ctx context.Context, opts ...Option) *DNSResolverBuilder

func (*DNSResolverBuilder) Build

func (*DNSResolverBuilder) Scheme

func (d *DNSResolverBuilder) Scheme() string

type NetResolver

type NetResolver interface {
	LookupHost(context.Context, string) ([]string, error)
	LookupIPAddr(context.Context, string) ([]net.IPAddr, error)
	LookupSRV(context.Context, string, string, string) (string, []*net.SRV, error)
}

type Option

type Option func(o *option)

func WithDNSReResolving

func WithDNSReResolving(d time.Duration) Option

func WithDefaultPort

func WithDefaultPort(p uint16) Option

func WithDnsAuthority

func WithDnsAuthority(authority string) Option

func WithResolver

func WithResolver(r NetResolver) Option

func WithResolvingTimeout

func WithResolvingTimeout(d time.Duration) Option

Jump to

Keyboard shortcuts

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