hosts

package
v3.9.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: GPL-3.0 Imports: 8 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 added in v3.9.0

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

Jump to

Keyboard shortcuts

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