dns

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostToIP

func HostToIP(ctx context.Context, host string) (string, error)

HostToIP resolves the given host If multiple IP addresses are assigned to the host, a random one is returned

func IPToHost

func IPToHost(ip string) string

IPToHost do reverse DNS of ip If multiple Addresses are assigned to the ip, a random one is returned

Types

type DNSInfo

type DNSInfo struct {
	// IP represent the ip of the host
	IP string
	// reverse dns record
	RDns string
}

Jump to

Keyboard shortcuts

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