nslookup

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourceLookupIP

func DataSourceLookupIP() *schema.Resource

func DataSourceLookupMX

func DataSourceLookupMX() *schema.Resource

func DataSourceLookupNS

func DataSourceLookupNS() *schema.Resource

func DataSourceLookupPTR

func DataSourceLookupPTR() *schema.Resource

func DataSourceLookupSRV

func DataSourceLookupSRV() *schema.Resource

func DataSourceLookupTXT

func DataSourceLookupTXT() *schema.Resource

Types

type Lookup

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

Lookup is currently thin wrapper around Go's net lookup functions with possibility to use custom resolver

func NewLookup

func NewLookup(ctx context.Context, proto string, addr string, timeout time.Duration) *Lookup

func NewLookupFromResourceData

func NewLookupFromResourceData(ctx context.Context, d *schema.ResourceData) *Lookup

func (*Lookup) Address

func (l *Lookup) Address(ctx context.Context, host string) (addrs []string, err error)

Address returns a slice of host's IPv4 and IPv6 addresses.

func (*Lookup) MailExchange

func (l *Lookup) MailExchange(ctx context.Context, host string) (hosts []MailExchange, err error)

MailExchange returns the DNS MX records for the given host name sorted by priority.

func (*Lookup) Nameserver

func (l *Lookup) Nameserver(ctx context.Context, host string) (hosts []string, err error)

Nameserver returns the DNS NS records for the given domain name.

func (*Lookup) Reverse

func (l *Lookup) Reverse(ctx context.Context, addr string) (names []string, err error)

Reverse performs a reverse lookup for the given address, returning a list of names mapping to that address.

func (*Lookup) Service

func (l *Lookup) Service(ctx context.Context, service, proto, name string) (targets []ServiceTarget, err error)

Service returns service targest sorted by priority.

func (*Lookup) Text

func (l *Lookup) Text(ctx context.Context, host string) (texts []string, err error)

Text returns the DNS TXT records for the given domain name.

type MailExchange

type MailExchange struct {
	Host     string
	Priority uint16
}

type ServiceTarget

type ServiceTarget struct {
	Host     string
	Priority uint16
	Weight   uint16
	Port     uint16
}

Jump to

Keyboard shortcuts

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