contour: github.com/projectcontour/contour/internal/envoy/v3 Index | Files

package v3

import "github.com/projectcontour/contour/internal/envoy/v3"

Index

Package Files

accesslog.go auth.go bootstrap.go cluster.go endpoint.go healthcheck.go listener.go ratelimit.go regex.go route.go secret.go socket.go stats.go tcp_keepalive.go tls.go

Constants

const (
    HTTPVersionAuto HTTPVersionType = http.HttpConnectionManager_AUTO
    HTTPVersion1    HTTPVersionType = http.HttpConnectionManager_HTTP1
    HTTPVersion2    HTTPVersionType = http.HttpConnectionManager_HTTP2
    HTTPVersion3    HTTPVersionType = http.HttpConnectionManager_HTTP3

    HTTPFilterRouter  = "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
    HTTPFilterCORS    = "type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors"
    HTTPFilterGrpcWeb = "type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb"
    HTTPFilterGzip    = "type.googleapis.com/envoy.extensions.compression.gzip.compressor.v3.Gzip"
)

func AppendHeader Uses

func AppendHeader(key, value string) *envoy_core_v3.HeaderValueOption

func CORSPolicy Uses

func CORSPolicy(cp *dag.CORSPolicy) *envoy_route_v3.CorsPolicy

CORSPolicy returns a *envoy_route_v3.CORSPolicy

func CORSVirtualHost Uses

func CORSVirtualHost(hostname string, corspolicy *envoy_route_v3.CorsPolicy, routes ...*envoy_route_v3.Route) *envoy_route_v3.VirtualHost

CORSVirtualHost creates a new route.VirtualHost with a CORS policy.

func Cluster Uses

func Cluster(c *dag.Cluster) *envoy_cluster_v3.Cluster

Cluster creates new envoy_cluster_v3.Cluster from dag.Cluster.

func ClusterCommonLBConfig Uses

func ClusterCommonLBConfig() *envoy_cluster_v3.Cluster_CommonLbConfig

ClusterCommonLBConfig creates a *envoy_cluster_v3.Cluster_CommonLbConfig with HealthyPanicThreshold disabled.

func ClusterDiscoveryType Uses

func ClusterDiscoveryType(t envoy_cluster_v3.Cluster_DiscoveryType) *envoy_cluster_v3.Cluster_Type

ClusterDiscoveryType returns the type of a ClusterDiscovery as a Cluster_type.

func ClusterLoadAssignment Uses

func ClusterLoadAssignment(name string, addrs ...*envoy_core_v3.Address) *envoy_endpoint_v3.ClusterLoadAssignment

ClusterLoadAssignment returns a *envoy_endpoint_v3.ClusterLoadAssignment with a single LocalityLbEndpoints of the supplied addresses.

func ConfigSource Uses

func ConfigSource(cluster string) *envoy_core_v3.ConfigSource

ConfigSource returns a *envoy_core_v3.ConfigSource for cluster.

func ContainsFallbackFilterChain Uses

func ContainsFallbackFilterChain(filterchains []*envoy_listener_v3.FilterChain) bool

func DownstreamTLSContext Uses

func DownstreamTLSContext(serverSecret *dag.Secret, tlsMinProtoVersion envoy_v3_tls.TlsParameters_TlsProtocol, peerValidationContext *dag.PeerValidationContext, alpnProtos ...string) *envoy_v3_tls.DownstreamTlsContext

DownstreamTLSContext creates a new DownstreamTlsContext.

func DownstreamTLSTransportSocket Uses

func DownstreamTLSTransportSocket(tls *envoy_tls_v3.DownstreamTlsContext) *envoy_core_v3.TransportSocket

DownstreamTLSTransportSocket returns a custom transport socket using the DownstreamTlsContext provided.

func Endpoints Uses

func Endpoints(addrs ...*envoy_core_v3.Address) []*envoy_endpoint_v3.LocalityLbEndpoints

Endpoints returns a slice of LocalityLbEndpoints. The slice contains one entry, with one LbEndpoint per *envoy_core_v3.Address supplied.

func ExtensionCluster Uses

func ExtensionCluster(ext *dag.ExtensionCluster) *envoy_cluster_v3.Cluster

ExtensionCluster builds a envoy_cluster_v3.Cluster struct for the given extension service.

func FileAccessLogEnvoy Uses

func FileAccessLogEnvoy(path string) []*envoy_accesslog_v3.AccessLog

FileAccessLogEnvoy returns a new file based access log filter that will output Envoy's default access logs.

func FileAccessLogJSON Uses

func FileAccessLogJSON(path string, fields config.AccessLogFields) []*envoy_accesslog_v3.AccessLog

FileAccessLogJSON returns a new file based access log filter that will log in JSON format

func FilterChain Uses

func FilterChain(filters ...*envoy_listener_v3.Filter) *envoy_listener_v3.FilterChain

FilterChain returns a *envoy_listener_v3.FilterChain for the supplied filters.

func FilterChainTLS Uses

func FilterChainTLS(domain string, downstream *envoy_tls_v3.DownstreamTlsContext, filters []*envoy_listener_v3.Filter) *envoy_listener_v3.FilterChain

FilterChainTLS returns a TLS enabled envoy_listener_v3.FilterChain.

func FilterChainTLSFallback Uses

func FilterChainTLSFallback(downstream *envoy_tls_v3.DownstreamTlsContext, filters []*envoy_listener_v3.Filter) *envoy_listener_v3.FilterChain

FilterChainTLSFallback returns a TLS enabled envoy_listener_v3.FilterChain conifgured for FallbackCertificate.

func FilterChains Uses

func FilterChains(filters ...*envoy_listener_v3.Filter) []*envoy_listener_v3.FilterChain

FilterChains returns a []*envoy_listener_v3.FilterChain for the supplied filters.

func FilterExternalAuthz Uses

func FilterExternalAuthz(authzClusterName string, failOpen bool, timeout timeout.Setting) *http.HttpFilter

FilterExternalAuthz returns an `ext_authz` filter configured with the requested parameters.

func FilterMisdirectedRequests Uses

func FilterMisdirectedRequests(fqdn string) *http.HttpFilter

func Filters Uses

func Filters(filters ...*envoy_listener_v3.Filter) []*envoy_listener_v3.Filter

Filters returns a []*envoy_listener_v3.Filter for the supplied filters.

func HTTPConnectionManager Uses

func HTTPConnectionManager(routename string, accesslogger []*accesslog.AccessLog, requestTimeout time.Duration) *envoy_listener_v3.Filter

HTTPConnectionManager creates a new HTTP Connection Manager filter for the supplied route, access log, and client request timeout.

func HTTPConnectionManagerBuilder Uses

func HTTPConnectionManagerBuilder() *httpConnectionManagerBuilder

HTTPConnectionManagerBuilder creates a new HTTP connection manager builder.

func HeaderValueList Uses

func HeaderValueList(hvm map[string]string, app bool) []*envoy_core_v3.HeaderValueOption

HeaderValueList creates a list of Envoy HeaderValueOptions from the provided map.

func Headers Uses

func Headers(first *envoy_core_v3.HeaderValueOption, rest ...*envoy_core_v3.HeaderValueOption) []*envoy_core_v3.HeaderValueOption

func LBEndpoint Uses

func LBEndpoint(addr *envoy_core_v3.Address) *envoy_endpoint_v3.LbEndpoint

LBEndpoint creates a new LbEndpoint.

func Listener Uses

func Listener(name, address string, port int, lf []*envoy_listener_v3.ListenerFilter, filters ...*envoy_listener_v3.Filter) *envoy_listener_v3.Listener

Listener returns a new envoy_listener_v3.Listener for the supplied address, port, and filters.

func ListenerFilters Uses

func ListenerFilters(filters ...*envoy_listener_v3.ListenerFilter) []*envoy_listener_v3.ListenerFilter

ListenerFilters returns a []*envoy_listener_v3.ListenerFilter for the supplied listener filters.

func LocalRateLimitConfig Uses

func LocalRateLimitConfig(config *dag.LocalRateLimitPolicy, statPrefix string) *any.Any

LocalRateLimitConfig returns a config for the HTTP local rate limit filter.

func ParseTLSVersion Uses

func ParseTLSVersion(version string) envoy_tls_v3.TlsParameters_TlsProtocol

func ProtoNamesForVersions Uses

func ProtoNamesForVersions(versions ...HTTPVersionType) []string

ProtoNamesForVersions returns the slice of ALPN protocol names for the give HTTP versions.

func ProxyProtocol Uses

func ProxyProtocol() *envoy_listener_v3.ListenerFilter

ProxyProtocol returns a new Proxy Protocol listener filter.

func RouteAuthzContext Uses

func RouteAuthzContext(settings map[string]string) *any.Any

RouteAuthzContext returns a per-route config to pass the given context entries in the check request.

func RouteAuthzDisabled Uses

func RouteAuthzDisabled() *any.Any

RouteAuthzDisabled returns a per-route config to disable authorization.

func RouteConfiguration Uses

func RouteConfiguration(name string, virtualhosts ...*envoy_route_v3.VirtualHost) *envoy_route_v3.RouteConfiguration

RouteConfiguration returns a *envoy_route_v3.RouteConfiguration.

func RouteMatch Uses

func RouteMatch(route *dag.Route) *envoy_route_v3.RouteMatch

RouteMatch creates a *envoy_route_v3.RouteMatch for the supplied *dag.Route.

func RouteRoute Uses

func RouteRoute(r *dag.Route) *envoy_route_v3.Route_Route

RouteRoute creates a *envoy_route_v3.Route_Route for the services supplied. If len(services) is greater than one, the route's action will be a weighted cluster.

func SafeRegexMatch Uses

func SafeRegexMatch(regex string) *matcher.RegexMatcher

SafeRegexMatch returns a matcher.RegexMatcher for the supplied regex. SafeRegexMatch does not escape regex meta characters.

func Secret Uses

func Secret(s *dag.Secret) *envoy_tls_v3.Secret

Secret creates new envoy_tls_v3.Secret from secret.

func SocketAddress Uses

func SocketAddress(address string, port int) *envoy_core_v3.Address

SocketAddress creates a new TCP envoy_core_v3.Address.

func StaticClusterLoadAssignment Uses

func StaticClusterLoadAssignment(service *dag.Service) *envoy_endpoint_v3.ClusterLoadAssignment

StaticClusterLoadAssignment creates a *envoy_endpoint_v3.ClusterLoadAssignment pointing to the external DNS address of the service

func StatsListener Uses

func StatsListener(address string, port int) *envoy_listener_v3.Listener

StatsListener returns a *envoy_listener_v3.Listener configured to serve prometheus metrics on /stats.

func TCPKeepaliveSocketOptions Uses

func TCPKeepaliveSocketOptions() []*envoy_core_v3.SocketOption

func TCPProxy Uses

func TCPProxy(statPrefix string, proxy *dag.TCPProxy, accesslogger []*accesslog.AccessLog) *envoy_listener_v3.Filter

TCPProxy creates a new TCPProxy filter.

func TLSInspector Uses

func TLSInspector() *envoy_listener_v3.ListenerFilter

TLSInspector returns a new TLS inspector listener filter.

func UpgradeHTTPS Uses

func UpgradeHTTPS() *envoy_route_v3.Route_Redirect

UpgradeHTTPS returns a route Action that redirects the request to HTTPS.

func UpstreamTLSContext Uses

func UpstreamTLSContext(peerValidationContext *dag.PeerValidationContext, sni string, clientSecret *dag.Secret, alpnProtocols ...string) *envoy_v3_tls.UpstreamTlsContext

UpstreamTLSContext creates an envoy_v3_tls.UpstreamTlsContext. By default UpstreamTLSContext returns a HTTP/1.1 TLS enabled context. A list of additional ALPN protocols can be provided.

func UpstreamTLSTransportSocket Uses

func UpstreamTLSTransportSocket(tls *envoy_tls_v3.UpstreamTlsContext) *envoy_core_v3.TransportSocket

UpstreamTLSTransportSocket returns a custom transport socket using the UpstreamTlsContext provided.

func VirtualHost Uses

func VirtualHost(hostname string, routes ...*envoy_route_v3.Route) *envoy_route_v3.VirtualHost

VirtualHost creates a new route.VirtualHost.

func WeightedEndpoints Uses

func WeightedEndpoints(weight uint32, addrs ...*envoy_core_v3.Address) []*envoy_endpoint_v3.LocalityLbEndpoints

func WriteBootstrap Uses

func WriteBootstrap(c *envoy.BootstrapConfig) error

WriteBootstrap writes bootstrap configuration to files.

type HTTPVersionType Uses

type HTTPVersionType = http.HttpConnectionManager_CodecType

func CodecForVersions Uses

func CodecForVersions(versions ...HTTPVersionType) HTTPVersionType

CodecForVersions determines a single Envoy HTTP codec constant that support all the given HTTP protocol versions.

Package v3 imports 45 packages (graph) and is imported by 5 packages. Updated 2021-01-22. Refresh now. Tools for package owners.