dns

package
v1.68.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package dns implements a dns resolver to be installed as the default resolver in grpc.

Index

Constants

This section is empty.

Variables

View Source
var (
	// EnableSRVLookups controls whether the DNS resolver attempts to fetch gRPCLB
	// addresses from SRV records.  Must not be changed after init time.
	EnableSRVLookups = false

	// MinResolutionInterval is the minimum interval at which re-resolutions are
	// allowed. This helps to prevent excessive re-resolution.
	MinResolutionInterval = 30 * time.Second

	// ResolvingTimeout specifies the maximum duration for a DNS resolution request.
	// If the timeout expires before a response is received, the request will be canceled.
	//
	// It is recommended to set this value at application startup. Avoid modifying this variable
	// after initialization as it's not thread-safe for concurrent modification.
	ResolvingTimeout = 30 * time.Second
)

Functions

func NewBuilder

func NewBuilder() resolver.Builder

NewBuilder creates a dnsBuilder which is used to factory DNS resolvers.

Types

This section is empty.

Directories

Path Synopsis
Package internal contains functionality internal to the dns resolver package.
Package internal contains functionality internal to the dns resolver package.

Jump to

Keyboard shortcuts

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