dns

package
v0.0.0-...-694aa1c Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithDNSClient

func ContextWithDNSClient(ctx routing.Context, client dns.Client) routing.Context

ContextWithDNSClient creates a new routing context with domain resolving capability. Resolved domain IPs can be retrieved by GetTargetIPs().

Types

type ResolvableContext

type ResolvableContext struct {
	routing.Context
	// contains filtered or unexported fields
}

ResolvableContext is an implementation of routing.Context, with domain resolving capability.

func (*ResolvableContext) GetTargetIPs

func (ctx *ResolvableContext) GetTargetIPs() []net.IP

GetTargetIPs overrides original routing.Context's implementation.

Jump to

Keyboard shortcuts

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