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
Click to show internal directories.
Click to hide internal directories.