envoy

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCluster

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

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

func NewHTTPConnectionManager

func NewHTTPConnectionManager(routeConfigName string) *httpconnectionmanagerv2.HttpConnectionManager

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

func NewHTTPListener

func NewHTTPListener(manager *httpconnmanagerv2.HttpConnectionManager, port uint32) (*v2.Listener, error)

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

func NewHTTPSListener

func NewHTTPSListener(
	manager *httpconnmanagerv2.HttpConnectionManager,
	port uint32,
	certificateChain []byte,
	privateKey []byte) (*v2.Listener, error)

NewHTTPSListener creates a new Listener at the given port, backed by the given manager and serving the given certificate chain and key.

func NewHTTPSListenerWithSNI

func NewHTTPSListenerWithSNI(manager *httpconnmanagerv2.HttpConnectionManager, port uint32, sniMatches []*SNIMatch) (*v2.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 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) *v2.RouteConfiguration

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

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 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