listeners

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterChainBuilder

type FilterChainBuilder struct {
	// contains filtered or unexported fields
}

FilterChainBuilder is responsible for generating an Envoy filter chain by applying a series of FilterChainConfigurers.

func NewFilterChainBuilder

func NewFilterChainBuilder(apiVersion envoy.APIVersion) *FilterChainBuilder

func (*FilterChainBuilder) Build

Build generates an Envoy filter chain by applying a series of FilterChainConfigurers.

func (*FilterChainBuilder) Configure

Configure configures FilterChainBuilder by adding individual FilterChainConfigurers.

func (*FilterChainBuilder) ConfigureIf added in v1.8.1

func (b *FilterChainBuilder) ConfigureIf(condition bool, opts ...FilterChainBuilderOpt) *FilterChainBuilder

type FilterChainBuilderConfig

type FilterChainBuilderConfig struct {
	// A series of FilterChainConfigurers to apply to Envoy filter chain.
	ConfigurersV3 []v3.FilterChainConfigurer
}

FilterChainBuilderConfig holds configuration of a FilterChainBuilder.

func (*FilterChainBuilderConfig) AddV3

func (c *FilterChainBuilderConfig) AddV3(configurer v3.FilterChainConfigurer)

AddV3 appends a given FilterChainConfigurer to the end of the chain.

type FilterChainBuilderOpt

type FilterChainBuilderOpt interface {
	// ApplyTo adds FilterChainConfigurer(s) to the FilterChainBuilder.
	ApplyTo(config *FilterChainBuilderConfig)
}

FilterChainBuilderOpt is a configuration option for FilterChainBuilder.

The goal of FilterChainBuilderOpt is to facilitate fluent FilterChainBuilder API.

func AddFilterChainConfigurer added in v1.8.1

func AddFilterChainConfigurer(c v3.FilterChainConfigurer) FilterChainBuilderOpt

AddFilterChainConfigurer produces an option that applies the given configurer to the filter chain.

func DefaultCompressorFilter added in v1.8.1

func DefaultCompressorFilter() FilterChainBuilderOpt

DefaultCompressorFilter adds a gzip compressor filter in its default configuration.

func EnablePathNormalization added in v1.8.1

func EnablePathNormalization() FilterChainBuilderOpt

EnablePathNormalization enables HTTP request path normalization.

func FaultInjection

func FaultInjection(faultInjections ...*core_mesh.FaultInjectionResource) FilterChainBuilderOpt

func GrpcStats

func GrpcStats() FilterChainBuilderOpt

func HttpAccessLog

func HttpAccessLog(
	mesh string,
	trafficDirection envoy_common.TrafficDirection,
	sourceService string,
	destinationService string,
	backend *mesh_proto.LoggingBackend,
	proxy *core_xds.Proxy,
) FilterChainBuilderOpt

func HttpConnectionManager

func HttpConnectionManager(statsName string, forwardClientCertDetails bool) FilterChainBuilderOpt

func HttpDynamicRoute added in v1.8.1

func HttpDynamicRoute(name string) FilterChainBuilderOpt

HttpDynamicRoute configures the listener filter chain to dynamically request the named RouteConfiguration.

func HttpInboundRoutes

func HttpInboundRoutes(service string, routes envoy_common.Routes) FilterChainBuilderOpt

func HttpOutboundRoute

func HttpOutboundRoute(service string, routes envoy_common.Routes, dpTags mesh_proto.MultiValueTagSet) FilterChainBuilderOpt

func Kafka

func Kafka(statsName string) FilterChainBuilderOpt

func MatchApplicationProtocols added in v1.8.1

func MatchApplicationProtocols(alpn ...string) FilterChainBuilderOpt

MatchApplicationProtocols appends the given ALPN protocol names to the filter chain match.

func MatchServerNames added in v1.8.1

func MatchServerNames(names ...string) FilterChainBuilderOpt

MatchServerNames appends the giver server names to the filter chain match. These names are matches against the client SNI name for TLS sockets.

func MatchSourceAddress added in v1.8.1

func MatchSourceAddress(address string) FilterChainBuilderOpt

MatchSourceAddress appends an exact filter chain match for the given source IP address.

func MatchTransportProtocol added in v1.8.1

func MatchTransportProtocol(transport string) FilterChainBuilderOpt

MatchTransportProtocol sets the transport protocol match for the filter chain.

func MaxConnectAttempts

func MaxConnectAttempts(retry *core_mesh.RetryResource) FilterChainBuilderOpt

func NetworkAccessLog

func NetworkAccessLog(
	mesh string,
	trafficDirection envoy_common.TrafficDirection,
	sourceService string,
	destinationService string,
	backend *mesh_proto.LoggingBackend,
	proxy *core_xds.Proxy,
) FilterChainBuilderOpt

func NetworkRBAC

func NetworkRBAC(statsName string, rbacEnabled bool, permission *core_mesh.TrafficPermissionResource) FilterChainBuilderOpt

func RateLimit

func RateLimit(rateLimits []*core_mesh.RateLimitResource) FilterChainBuilderOpt

func Retry

func ServerHeader added in v1.8.1

func ServerHeader(name string) FilterChainBuilderOpt

ServerHeader sets the value that the HttpConnectionManager will write to the "Server" header in HTTP responses.

func ServerSideStaticMTLS added in v1.8.1

func ServerSideStaticMTLS(mtlsCerts core_xds.ServerSideMTLSCerts) FilterChainBuilderOpt

func StaticEndpoints

func StaticEndpoints(virtualHostName string, paths []*envoy_common.StaticEndpointPath) FilterChainBuilderOpt

func StripHostPort added in v1.8.1

func StripHostPort() FilterChainBuilderOpt

StripHostPort strips the port component before matching the HTTP host header (authority) to the available virtual hosts.

func TcpProxy

func TcpProxy(statsName string, clusters ...envoy_common.Cluster) FilterChainBuilderOpt

func TcpProxyWithMetadata

func TcpProxyWithMetadata(statsName string, clusters ...envoy_common.Cluster) FilterChainBuilderOpt

func Timeout

func Tracing

func Tracing(backend *mesh_proto.TracingBackend, service string) FilterChainBuilderOpt

type FilterChainBuilderOptFunc

type FilterChainBuilderOptFunc func(config *FilterChainBuilderConfig)

FilterChainBuilderOptFunc is a convenience type adapter.

func (FilterChainBuilderOptFunc) ApplyTo

type ListenerBuilder

type ListenerBuilder struct {
	// contains filtered or unexported fields
}

ListenerBuilder is responsible for generating an Envoy listener by applying a series of ListenerConfigurers.

func NewListenerBuilder

func NewListenerBuilder(apiVersion envoy.APIVersion) *ListenerBuilder

func (*ListenerBuilder) Build

func (b *ListenerBuilder) Build() (envoy.NamedResource, error)

Build generates an Envoy listener by applying a series of ListenerConfigurers.

func (*ListenerBuilder) Configure

func (b *ListenerBuilder) Configure(opts ...ListenerBuilderOpt) *ListenerBuilder

Configure configures ListenerBuilder by adding individual ListenerConfigurers.

type ListenerBuilderConfig

type ListenerBuilderConfig struct {
	// A series of ListenerConfigurers to apply to Envoy listener.
	ConfigurersV3 []v3.ListenerConfigurer
}

ListenerBuilderConfig holds configuration of a ListenerBuilder.

func (*ListenerBuilderConfig) AddV3

func (c *ListenerBuilderConfig) AddV3(configurer v3.ListenerConfigurer)

AddV3 appends a given ListenerConfigurer to the end of the chain.

type ListenerBuilderOpt

type ListenerBuilderOpt interface {
	// ApplyTo adds ListenerConfigurer(s) to the ListenerBuilder.
	ApplyTo(config *ListenerBuilderConfig)
}

ListenerBuilderOpt is a configuration option for ListenerBuilder.

The goal of ListenerBuilderOpt is to facilitate fluent ListenerBuilder API.

func AddListenerConfigurer added in v1.8.1

func AddListenerConfigurer(c v3.ListenerConfigurer) ListenerBuilderOpt

AddListenerConfigurer produces an option that applies the given configurer to the listener.

func ConnectionBufferLimit added in v1.8.1

func ConnectionBufferLimit(bytes uint32) ListenerBuilderOpt

func DNS

func DNS(vips map[string][]string, emptyDnsPort uint32, envoyVersion *mesh_proto.EnvoyVersion) ListenerBuilderOpt

func EnableFreebind added in v1.8.1

func EnableFreebind(enable bool) ListenerBuilderOpt

func EnableReusePort added in v1.8.1

func EnableReusePort(enable bool) ListenerBuilderOpt

func FilterChain

func FilterChain(builder *FilterChainBuilder) ListenerBuilderOpt

func InboundListener

func InboundListener(listenerName string, address string, port uint32, protocol core_xds.SocketAddressProtocol) ListenerBuilderOpt

func NoBindToPort

func NoBindToPort() ListenerBuilderOpt

func OriginalDstForwarder

func OriginalDstForwarder() ListenerBuilderOpt

func OutboundListener

func OutboundListener(listenerName string, address string, port uint32, protocol core_xds.SocketAddressProtocol) ListenerBuilderOpt

func TLSInspector

func TLSInspector() ListenerBuilderOpt

func TagsMetadata added in v1.8.1

func TagsMetadata(tags map[string]string) ListenerBuilderOpt

type ListenerBuilderOptFunc

type ListenerBuilderOptFunc func(config *ListenerBuilderConfig)

ListenerBuilderOptFunc is a convenience type adapter.

func (ListenerBuilderOptFunc) ApplyTo

func (f ListenerBuilderOptFunc) ApplyTo(config *ListenerBuilderConfig)

Directories

Path Synopsis
v3

Jump to

Keyboard shortcuts

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