dns

package
v4.1.14 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package dns provides reverse lookup functionality for goQuery's results

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDNS

func CheckDNS() error

CheckDNS is a no-op to check if a DNS resolver is present (deployment enviornment specific)

func TimedReverseLookup

func TimedReverseLookup(ctx context.Context, ips []string, timeout time.Duration) (ipToDomain map[string]string)

TimedReverseLookup performs a reverse lookup on the given ips. The lookup takes at most timeout time, afterwards it is aborted. Returns a mapping IP => domain. If the lookup is aborted because of a timeout, the current mapping is returned with the pending lookups missing. If there is no RDNS entry for an IP, the corresponding key in the result will not be associated with any value (i.e. domain).

Types

type LookupResult

type LookupResult struct {
	Success bool
	IP      string
	Domain  string
}

LookupResult stores the result of a reverse DNS lookup

Jump to

Keyboard shortcuts

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