consul

package
v0.18.7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 29 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidSpecTypeError = func(spec *v1.UpstreamSpec, name string) error {
		return errors.Errorf("internal error: invalid %s spec, "+
			"expected *v1.UpstreamSpec_Consul, got  %T", name, spec.UpstreamType)
	}
)

Functions

func BuildDataCenterMetadata added in v0.17.4

func BuildDataCenterMetadata(dataCenters []string, upstreams []*v1.Upstream) map[string]string

Similarly to what we do with tags, create a label for each data center and set it to "1" if the service instance is running in that data center.

func BuildTagMetadata added in v0.17.4

func BuildTagMetadata(tags []string, upstreams []*v1.Upstream) map[string]string

The ServiceTags on the Consul Upstream(s) represent all tags for Consul services with the given ServiceName across data centers. We create an endpoint label for each of these tags, where the label key is the name of the tag and the label value is "1" if the current service contains the same tag, else "0".

func NewPlugin

func NewPlugin(client consul.ConsulWatcher) *plugin

func UpdateUpstream added in v0.18.3

func UpdateUpstream(original, desired *v1.Upstream) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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