resolver

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package resolver implements the resolver used to resolve hostnames to IP addresses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(ctx context.Context, address string) (*net.IPAddr, error)

Resolve resolves the given hostname to an IP address. It prefers IPv4 addresses if available, and falls back to IPv6 addresses if not. If the hostname was already resolved and it is still valid, it returns the cached IP address.

Types

This section is empty.

Jump to

Keyboard shortcuts

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