resolvers

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInterfaceIpv4Addr

func GetInterfaceIpv4Addr(interfaceName string) (addr string, err error)

Types

type CliResolver

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

func NewCliResolver

func NewCliResolver(ipv4, ipv6, host string) (*CliResolver, error)

func (*CliResolver) Host

func (resolver *CliResolver) Host() string

func (*CliResolver) Name

func (resolver *CliResolver) Name() string

func (*CliResolver) Resolve

func (resolver *CliResolver) Resolve() (*common.DnsRecord, error)

type HttpResolver

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

func NewHttpResolver

func NewHttpResolver(domain string, preferredUrls []string, fallbackUrls []string, addressFamilies []string) (*HttpResolver, error)

func (*HttpResolver) Host

func (resolver *HttpResolver) Host() string

func (*HttpResolver) Name

func (resolver *HttpResolver) Name() string

func (*HttpResolver) Resolve

func (resolver *HttpResolver) Resolve() (*common.DnsRecord, error)

type InterfaceResolver

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

func NewInterfaceResolver

func NewInterfaceResolver(watchedInterface, host string) (*InterfaceResolver, error)

func (*InterfaceResolver) Host

func (resolver *InterfaceResolver) Host() string

func (*InterfaceResolver) Name

func (resolver *InterfaceResolver) Name() string

func (*InterfaceResolver) Resolve

func (resolver *InterfaceResolver) Resolve() (*common.DnsRecord, error)

type IpResolver

type IpResolver interface {
	Resolve() (*common.DnsRecord, error)
	Name() string
	Host() string
}

Jump to

Keyboard shortcuts

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