listeners

package
v0.0.0-...-b4a0618 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 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 core_xds.APIVersion, name string) *FilterChainBuilder

func (*FilterChainBuilder) AddConfigurer

func (b *FilterChainBuilder) AddConfigurer(configurer v3.FilterChainConfigurer)

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

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

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

type FilterChainBuilderOpt

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

FilterChainBuilderOpt is a configuration option for FilterChainBuilder.

The goal of FilterChainBuilderOpt is to facilitate fluent FilterChainBuilder API.

func AddFilterChainConfigurer

func AddFilterChainConfigurer(c v3.FilterChainConfigurer) FilterChainBuilderOpt

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

func DefaultCompressorFilter

func DefaultCompressorFilter() FilterChainBuilderOpt

DefaultCompressorFilter adds a gzip compressor filter in its default configuration.

func DirectResponse

func DirectResponse(virtualHostName string, endpoints []v3.DirectResponseEndpoints) FilterChainBuilderOpt

func EnablePathNormalization

func EnablePathNormalization() FilterChainBuilderOpt

EnablePathNormalization enables HTTP request path normalization.

func GrpcStats

func GrpcStats() FilterChainBuilderOpt

func HttpConnectionManager

func HttpConnectionManager(statsName string, forwardClientCertDetails bool) FilterChainBuilderOpt

func HttpDynamicRoute

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

func MatchApplicationProtocols(alpn ...string) FilterChainBuilderOpt

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

func MatchServerNames

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

func MatchSourceAddress(address string) FilterChainBuilderOpt

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

func MatchTransportProtocol

func MatchTransportProtocol(transport string) FilterChainBuilderOpt

MatchTransportProtocol sets the transport protocol match for the filter chain.

func ServerHeader

func ServerHeader(name string) FilterChainBuilderOpt

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

func StaticEndpoints

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

func StripHostPort

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, splits ...envoy_common.Split) FilterChainBuilderOpt

func TcpProxyDeprecated

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

func TcpProxyDeprecatedWithMetadata

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

func TripleConnectionManager

func TripleConnectionManager() FilterChainBuilderOpt

type FilterChainBuilderOptFunc

type FilterChainBuilderOptFunc func(builder *FilterChainBuilder)

FilterChainBuilderOptFunc is a convenience type adapter.

func (FilterChainBuilderOptFunc) ApplyTo

func (f FilterChainBuilderOptFunc) ApplyTo(builder *FilterChainBuilder)

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 NewInboundListenerBuilder

func NewInboundListenerBuilder(
	apiVersion core_xds.APIVersion,
	address string,
	port uint32,
	protocol core_xds.SocketAddressProtocol,
) *ListenerBuilder

NewInboundListenerBuilder creates an Inbound ListenBuilder with a default name: inbound:address:port

func NewListenerBuilder

func NewListenerBuilder(apiVersion core_xds.APIVersion, name string) *ListenerBuilder

func NewOutboundListenerBuilder

func NewOutboundListenerBuilder(
	apiVersion core_xds.APIVersion,
	address string,
	port uint32,
	protocol core_xds.SocketAddressProtocol,
) *ListenerBuilder

NewOutboundListenerBuilder creates an Outbound ListenBuilder with a default name: outbound:address:port

func (*ListenerBuilder) AddConfigurer

func (b *ListenerBuilder) AddConfigurer(configurer v3.ListenerConfigurer)

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

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.

func (*ListenerBuilder) GetName

func (b *ListenerBuilder) GetName() string

func (*ListenerBuilder) MustBuild

func (b *ListenerBuilder) MustBuild() envoy.NamedResource

func (*ListenerBuilder) WithOverwriteName

func (b *ListenerBuilder) WithOverwriteName(name string) *ListenerBuilder

type ListenerBuilderOpt

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

ListenerBuilderOpt is a configuration option for ListenerBuilder.

The goal of ListenerBuilderOpt is to facilitate fluent ListenerBuilder API.

func AddListenerConfigurer

func AddListenerConfigurer(c v3.ListenerConfigurer) ListenerBuilderOpt

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

func AdditionalAddresses

func AdditionalAddresses(addresses []mesh_proto.OutboundInterface) ListenerBuilderOpt

func ConnectionBufferLimit

func ConnectionBufferLimit(bytes uint32) ListenerBuilderOpt

func EnableFreebind

func EnableFreebind(enable bool) ListenerBuilderOpt

func EnableReusePort

func EnableReusePort(enable bool) ListenerBuilderOpt

func FilterChain

func FilterChain(builder *FilterChainBuilder) ListenerBuilderOpt

func InboundListener

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

func NoBindToPort

func NoBindToPort() ListenerBuilderOpt

func OriginalDstForwarder

func OriginalDstForwarder() ListenerBuilderOpt

func OutboundListener

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

func PipeListener

func PipeListener(socketPath string) ListenerBuilderOpt

func TLSInspector

func TLSInspector() ListenerBuilderOpt

func TagsMetadata

func TagsMetadata(tags map[string]string) ListenerBuilderOpt

type ListenerBuilderOptFunc

type ListenerBuilderOptFunc func(builder *ListenerBuilder)

ListenerBuilderOptFunc is a convenience type adapter.

func (ListenerBuilderOptFunc) ApplyTo

func (f ListenerBuilderOptFunc) ApplyTo(builder *ListenerBuilder)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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