dns

package
v4.31.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: MIT Imports: 4 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