dns

package
v0.0.0-...-8bab8ab Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 5 Imported by: 0

README

dns

Go Reference

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MAX_RETRIES int = 2

The number of tries in case of error.

Functions

func QueryA

func QueryA(name string) ([]net.IP, error)

QueryA returns net.IP structs of the answers. Returns nil in case of error. This function retries the query in case of error, up to MAX_RETRIES.

func QueryAAAA

func QueryAAAA(name string) ([]net.IP, error)

QueryAAAA returns net.IP structs of the answers. Returns nil in case of error. This function retries the query in case of error, up to MAX_RETRIES.

func QueryTXT

func QueryTXT(name string) ([]string, error)

QueryTXT returns the answer as a string slice. Returns nil in case of error. This function retries the query in case of error, up to MAX_RETRIES.

Types

type MX

type MX struct {
	Preference int    // Priority
	Exchange   string // Server's hostname
}

func QueryMX

func QueryMX(name string) ([]MX, error)

QueryMX returns MX structs of the answers. Returns nil in case of error. This function retries the query in case of error, up to MAX_RETRIES.

Jump to

Keyboard shortcuts

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