envoy

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFilterChainFromCertificateAndPrivateKey added in v0.29.0

func CreateFilterChainFromCertificateAndPrivateKey(
	manager *hcm.HttpConnectionManager,
	cert *Certificate) (*listener.FilterChain, error)

CreateFilterChainFromCertificateAndPrivateKey creates a new filter chain from a certificate and a private key

func CreateListenerName added in v0.29.0

func CreateListenerName(port uint32) string

CreateListenerName returns a listener name based on port

func NewCluster

func NewCluster(
	name string,
	connectTimeout time.Duration,
	endpoints []*endpoint.LbEndpoint,
	isHTTP2 bool, transportSocket *envoycorev3.TransportSocket,
	discoveryType envoyclusterv3.Cluster_DiscoveryType) *envoyclusterv3.Cluster

NewCluster generates a new v3.Cluster with the given settings.

func NewHTTPConnectionManager

func NewHTTPConnectionManager(routeConfigName string, kourierConfig *config.Kourier) *hcm.HttpConnectionManager

NewHTTPConnectionManager creates a new HttpConnectionManager that points to the given RouteConfig for further configuration.

func NewHTTPListener

func NewHTTPListener(manager *hcm.HttpConnectionManager, port uint32, enableProxyProtocol bool) (*listener.Listener, error)

NewHTTPListener creates a new Listener at the given port, backed by the given manager.

func NewHTTPSListener

func NewHTTPSListener(port uint32, filterChain []*listener.FilterChain, enableProxyProtocol bool) (*listener.Listener, error)

NewHTTPSListener creates a new Listener at the given port with a given filter chain

func NewHTTPSListenerWithSNI

func NewHTTPSListenerWithSNI(manager *hcm.HttpConnectionManager, port uint32, sniMatches []*SNIMatch, kourierConfig *config.Kourier) (*listener.Listener, error)

NewHTTPSListenerWithSNI creates a new Listener at the given port, backed by the given manager and applies a FilterChain with the given sniMatches.

Ref: https://www.envoyproxy.io/docs/envoy/latest/faq/configuration/sni.html

func NewLBEndpoint

func NewLBEndpoint(ip string, port uint32) *endpoint.LbEndpoint

NewLBEndpoint creates a new LbEndpoint.

func NewRedirectRoute added in v0.26.0

func NewRedirectRoute(name string,
	headersMatch []*route.HeaderMatcher,
	path string,
) *route.Route

func NewRoute

func NewRoute(name string,
	headersMatch []*route.HeaderMatcher,
	path string,
	wrs []*route.WeightedCluster_ClusterWeight,
	routeTimeout time.Duration,
	headers map[string]string,
	hostRewrite string) *route.Route

NewRoute creates a new Route.

func NewRouteConfig

func NewRouteConfig(name string, virtualHosts []*route.VirtualHost) *route.RouteConfiguration

NewRouteConfig create a new RouteConfiguration with the given name and hosts.

func NewRouteExtAuthzDisabled added in v0.30.0

func NewRouteExtAuthzDisabled(name string,
	headersMatch []*route.HeaderMatcher,
	path string,
	wrs []*route.WeightedCluster_ClusterWeight,
	routeTimeout time.Duration,
	headers map[string]string,
	hostRewrite string) *route.Route

func NewVirtualHost

func NewVirtualHost(name string, domains []string, routes []*route.Route) *route.VirtualHost

NewVirtualHost creates a new VirtualHost.

func NewVirtualHostWithExtAuthz

func NewVirtualHostWithExtAuthz(
	name string,
	contextExtensions map[string]string,
	domains []string,
	routes []*route.Route) *route.VirtualHost

NewVirtualHostWithExtAuthz creates a new VirtualHost with ExtAuthz settings.

func NewWeightedCluster

func NewWeightedCluster(name string, trafficPerc uint32, headers map[string]string) *route.WeightedCluster_ClusterWeight

NewWeightedCluster creates a new WeightedCluster.

Types

type Certificate added in v0.36.0

type Certificate struct {
	Certificate        []byte
	PrivateKey         []byte
	PrivateKeyProvider string
	PollDelay          *durationpb.Duration
	CipherSuites       []string
}

Certificate stores certificate data to generrate TLS context for downstream.

type SNIMatch

type SNIMatch struct {
	Hosts            []string
	CertSource       types.NamespacedName
	CertificateChain []byte
	PrivateKey       []byte
}

SNIMatch represents an SNI match, including the hosts to match, the certificates and keys to use and the source where we got the certs/keys from.

Jump to

Keyboard shortcuts

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