dns

package
v0.31.4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RefCountingResolver

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

func (*RefCountingResolver) AddDomain

func (self *RefCountingResolver) AddDomain(name string, cb func(string) (net.IP, error)) error

func (*RefCountingResolver) AddHostname

func (self *RefCountingResolver) AddHostname(s string, ip net.IP) error

func (*RefCountingResolver) Cleanup

func (self *RefCountingResolver) Cleanup() error

func (*RefCountingResolver) Lookup

func (self *RefCountingResolver) Lookup(ip net.IP) (string, error)

func (*RefCountingResolver) RemoveHostname

func (self *RefCountingResolver) RemoveHostname(s string) error

type Resolver

type Resolver interface {
	AddHostname(string, net.IP) error
	AddDomain(string, func(string) (net.IP, error)) error
	Lookup(net.IP) (string, error)
	RemoveHostname(string) error
	Cleanup() error
}

func NewDnsServer

func NewDnsServer(addr string) (Resolver, error)

func NewHostFile

func NewHostFile(path string) Resolver

func NewRefCountingResolver

func NewRefCountingResolver(resolver Resolver) Resolver

func NewResolver

func NewResolver(config string) (Resolver, error)

Jump to

Keyboard shortcuts

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