resolver

package
v0.0.0-...-8e6527b Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FallbackResolver

type FallbackResolver metaResolver

FallbackResolver is ...

func (*FallbackResolver) DialContext

func (r *FallbackResolver) DialContext(ctx context.Context, network, addr string) (conn net.Conn, err error)

DialContext is ...

func (*FallbackResolver) Resolve

func (r *FallbackResolver) Resolve(b []byte, l int) (n int, err error)

Resolve is ...

type Resolver

type Resolver interface {
	// Resolve is ...
	// resolve dns query in byte slice and store answers to the incoming byte slice
	// for compatible reason, the first 2 bytes are reserved for length space for
	// dns over tcp and dns over tls, the input length is the length of dns message
	// without 2 prefix bytes, and the output length also does not include the prefix bytes
	Resolve([]byte, int) (int, error)
	// DialContext is ...
	// net.Resovler.Dial
	DialContext(context.Context, string, string) (net.Conn, error)
}

Resolver is ...

func NewMultiResolver

func NewMultiResolver(ss []string, t Type) (Resolver, error)

NewMultiResolver is ...

func NewResolver

func NewResolver(s string) (Resolver, error)

NewResolver is ...

type Type

type Type int

Type is ...

const (
	// Fallback is ...
	Fallback Type = iota
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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