hosts

package
v1.12.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPath = "/etc/hosts"

Functions

func RegisterTransport

func RegisterTransport(registry *dns.TransportRegistry)

Types

type File

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

func NewFile

func NewFile(path string) *File

func (*File) Lookup

func (f *File) Lookup(name string) []netip.Addr

type Transport

type Transport struct {
	dns.TransportAdapter
	// contains filtered or unexported fields
}

func (*Transport) Exchange

func (t *Transport) Exchange(ctx context.Context, message *mDNS.Msg) (*mDNS.Msg, error)

func (*Transport) Reset

func (t *Transport) Reset()

Jump to

Keyboard shortcuts

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