resolve

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

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