upstream

package
Version: v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 446

Documentation

Overview

Package upstream abstracts a upstream lookups so that plugins can handle them in an unified way.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Upstream

type Upstream struct{}

Upstream is used to resolve CNAME or other external targets via CoreDNS itself.

func New added in v1.1.4

func New() *Upstream

New creates a new Upstream to resolve names using the coredns process.

func (*Upstream) Lookup

func (u *Upstream) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error)

Lookup routes lookups to our selves to make it follow the plugin chain *again*, but with a (possibly) new query. As we are doing the query against ourselves again, there is no actual new hop, as such RFC 6891 does not apply and we need the EDNS0 option present in the *original* query to be present here too.

Source Files

Jump to

Keyboard shortcuts

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