xdscommon

package
v0.3.0-rc1.0...-9dd6c97 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PublicListenerName is the name we give the public listener in Envoy config.
	PublicListenerName = "public_listener"

	// OutboundListenerName is the name we give the outbound Envoy listener when transparent proxy mode is enabled.
	OutboundListenerName = "outbound_listener"

	// LocalAppClusterName is the name we give the local application "cluster" in
	// Envoy config. Note that all cluster names may collide with service names
	// since we want cluster names and service names to match to enable nice
	// metrics correlation without massaging prefixes on cluster names.
	//
	// We should probably make this more unlikely to collide however changing it
	// potentially breaks upgrade compatibility without restarting all Envoy's as
	// it will no longer match their existing cluster name. Changing this will
	// affect metrics output so could break dashboards (for local app traffic).
	//
	// We should probably just make it configurable if anyone actually has
	// services named "local_app" in the future.
	LocalAppClusterName = "local_app"

	// EndpointType is the TypeURL for Endpoint discovery responses.
	EndpointType = apiTypePrefix + "envoy.config.endpoint.v3.ClusterLoadAssignment"

	// ClusterType is the TypeURL for Cluster discovery responses.
	ClusterType = apiTypePrefix + "envoy.config.cluster.v3.Cluster"

	// RouteType is the TypeURL for Route discovery responses.
	RouteType = apiTypePrefix + "envoy.config.route.v3.RouteConfiguration"

	// ListenerType is the TypeURL for Listener discovery responses.
	ListenerType = apiTypePrefix + "envoy.config.listener.v3.Listener"

	// SecretType is the TypeURL for Secret discovery responses.
	SecretType = apiTypePrefix + "envoy.extensions.transport_sockets.tls.v3.Secret"

	FailoverClusterNamePrefix = "failover-target~"
)

Variables

View Source
var EnvoyVersions = []string{
	"1.26.4",
	"1.25.9",
	"1.24.10",
	"1.23.12",
}

EnvoyVersions lists the latest officially supported versions of envoy.

This list must be sorted by semver descending. Only one point release for each major release should be present.

see: https://www.consul.io/docs/connect/proxies/envoy#supported-versions

View Source
var UnsupportedEnvoyVersions = []string{}

UnsupportedEnvoyVersions lists any unsupported Envoy versions (mainly minor versions) that fall within the range of EnvoyVersions above. For example, if patch 1.21.3 (patch 3) had a breaking change, and was not supported even though 1.21 is a supported major release, you would then add 1.21.3 to this list. This list will be empty in most cases.

see: https://www.consul.io/docs/connect/proxies/envoy#supported-versions

Functions

func DetermineEnvoyVersionFromNode

func DetermineEnvoyVersionFromNode(node *envoy_core_v3.Node) *version.Version

func GetMaxEnvoyMinorVersion

func GetMaxEnvoyMinorVersion() string

GetMaxEnvoyMinorVersion grabs the first value in EnvoyVersions and strips the patch number off in order to return the maximum supported Envoy minor version For example, if the input string is "1.14.1", the function would return "1.14".

func GetMinEnvoyMinorVersion

func GetMinEnvoyMinorVersion() string

GetMinEnvoyMinorVersion grabs the last value in EnvoyVersions and strips the patch number off in order to return the minimum supported Envoy minor version For example, if the input string is "1.12.1", the function would return "1.12".

func GetResourceName

func GetResourceName(res proto.Message) string

Types

type IndexedResources

type IndexedResources struct {
	// Index is a map of typeURL => resourceName => resource
	Index map[string]map[string]proto.Message

	// ChildIndex is a map of typeURL => parentResourceName => list of
	// childResourceNames. This only applies if the child and parent do not
	// share a name.
	ChildIndex map[string]map[string][]string
}

func Clone

Clone makes a deep copy of the IndexedResources value at the given pointer and returns a pointer to the copy.

func EmptyIndexedResources

func EmptyIndexedResources() *IndexedResources

func IndexResources

func IndexResources(logger hclog.Logger, resources map[string][]proto.Message) *IndexedResources

type SupportedProxyFeatures

type SupportedProxyFeatures struct {
}

func DetermineSupportedProxyFeatures

func DetermineSupportedProxyFeatures(node *envoy_core_v3.Node) (SupportedProxyFeatures, error)

func DetermineSupportedProxyFeaturesFromString

func DetermineSupportedProxyFeaturesFromString(vs string) (SupportedProxyFeatures, error)

Jump to

Keyboard shortcuts

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