discoverychain

package
v1.6.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

Compile assembles a discovery chain in the form of a graph of nodes using raw config entries and local context.

"Node" referenced in this file refers to a node in a graph and not to the Consul construct called a "Node".

Omitting router and splitter entries for services not using an L7 protocol (like HTTP) happens during initial fetching, but for sanity purposes a quick reinforcement of that happens here, too.

May return a *structs.ConfigEntryGraphError, but that is only expected when being used to validate modifications to the config entry graph. It should not be expected when compiling existing entries at runtime that are already valid.

func TestCompileConfigEntries

func TestCompileConfigEntries(
	t testing.T,
	serviceName string,
	currentNamespace string,
	currentDatacenter string,
	entries ...structs.ConfigEntry,
) *structs.CompiledDiscoveryChain

Types

type CompileRequest

type CompileRequest struct {
	ServiceName       string
	CurrentNamespace  string
	CurrentDatacenter string
	InferDefaults     bool // TODO(rb): remove this?
	Entries           *structs.DiscoveryChainConfigEntries
}

Jump to

Keyboard shortcuts

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