lib_domain_name_resolver

package
v0.0.0-20240423 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPTION_NAMES                = "names"
	OPTION_ADDRESSES            = "addresses"
	OPTION_DOMAIN_NAME_RESOLVER = "domainNameResolver"
)

Variables

View Source
var (
	WithNames, GetNames                           = option.New[[]string](OPTION_NAMES)
	WithAddresses, GetAddresses                   = option.New[[]addr.Addr](OPTION_ADDRESSES)
	WithDomainNameResolver, GetDomainNameResolver = option.New[*DomainNameResolver](OPTION_DOMAIN_NAME_RESOLVER)
)
View Source
var (
	ErrLengthShouldBeEqual = fmt.Errorf("length should be equal")
)

Functions

This section is empty.

Types

type DomainNameResolver

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

func FromString

func FromString(s string) (*DomainNameResolver, error)

func NewDomainNameResolver

func NewDomainNameResolver(opts ...NewDomainNameResolverOption) (*DomainNameResolver, error)

func (*DomainNameResolver) ResolveAddress

func (r *DomainNameResolver) ResolveAddress(address addr.Addr) []string

func (*DomainNameResolver) ResolveName

func (r *DomainNameResolver) ResolveName(name string) []addr.Addr

type NewDomainNameResolverOption

type NewDomainNameResolverOption = option.ApplyOption

Jump to

Keyboard shortcuts

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