hosts

package
v4.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hosts

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

func NewHosts

func NewHosts(m domain.Matcher[*IPs]) *Hosts

NewHosts creates a hosts using m.

func (*Hosts) Lookup

func (h *Hosts) Lookup(fqdn string) (ipv4, ipv6 []netip.Addr)

func (*Hosts) LookupMsg

func (h *Hosts) LookupMsg(m *dns.Msg) *dns.Msg

type IPs

type IPs struct {
	IPv4 []netip.Addr
	IPv6 []netip.Addr
}

func ParseIPs

func ParseIPs(s string) (*IPs, error)

Jump to

Keyboard shortcuts

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