Documentation ¶
Overview ¶
Package resolve allows to resolve DNS records via cloudflare DNS servers.
Index ¶
Constants ¶
View Source
const ( // DNSServer defines the port and address from which to query DNS records. // Set to cloudflare DNS to avoid as much record caching as possible. DNSServer = "[2606:4700:4700::1111]:53" // MXPort defines the port that is assumed for SMTP servers pointed to from within MX records. MXPort = 25 )
Variables ¶
This section is empty.
Functions ¶
func Pointer ¶
func Pointer(ctx context.Context, name string, pointerType, recordType uint16) (string, string, error)
Pointer resolves a SRV or MX record with the given name and pointerType. It then picks the first answer of the type recordType and returns the server name and a net.Dial compatible address string for it. If there is no answer or another problem pops up an error is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.