fall

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package fall handles the fallthrough logic used in plugins that support it. Be careful when including this functionality in your plugin. Why? In the DNS only 1 source is authoritative for a set of names. Fallthrough breaks this convention by allowing a plugin to query multiple sources, depending on the replies it got sofar.

This may cause issues in downstream caches, where different answers for the same query can potentially confuse clients. On the other hand this is a powerful feature that can aid in migration or other edge cases.

The take away: be mindful of this and don't blindly assume it's a good feature to have in your plugin.

See https://github.com/mr-torgue/coredns/issues/2723 for some discussion on this, which includes this quote:

TL;DR: `fallthrough` is indeed risky and hackish, but still a good feature of CoreDNS as it allows to quickly answer boring edge cases.

Index

Constants

This section is empty.

Variables

View Source
var Root = func() F {
	return F{[]string{"."}}
}()

Root returns F set to only ".".

View Source
var Zero = func() F {
	return F{[]string{}}
}()

Zero returns a zero valued F.

Functions

This section is empty.

Types

type F

type F struct {
	Zones []string
}

F can be nil to allow for no fallthrough, empty allow all zones to fallthrough or contain a zone list that is checked.

func (*F) Equal

func (f *F) Equal(g F) bool

Equal returns true if f and g are equal.

func (*F) SetZonesFromArgs

func (f *F) SetZonesFromArgs(zones []string)

SetZonesFromArgs sets zones in f to the passed value or to "." if the slice is empty.

func (F) Through

func (f F) Through(qname string) bool

Through will check if we should fallthrough for qname. Note that we've named the variable in each plugin "Fall", so this then reads Fall.Through().

Jump to

Keyboard shortcuts

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