listeners

package
v0.0.0-...-4760111 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBandwidthToKbps

func ConvertBandwidthToKbps(bandwidth string) (uint64, error)

func ConvertPercentage

func ConvertPercentage(percentage *wrappers.DoubleValue) *envoy_type.FractionalPercent

func NewUnexpectedFilterConfigTypeError

func NewUnexpectedFilterConfigTypeError(actual, expected proto.Message) error

func UpdateFilterConfig

func UpdateFilterConfig(filterChain *envoy_listener.FilterChain, filterName string, updateFunc func(proto.Message) error) error

func UpdateHTTPConnectionManager

func UpdateHTTPConnectionManager(filterChain *envoy_listener.FilterChain, updateFunc func(manager *envoy_hcm.HttpConnectionManager) error) error

func UpdateTCPProxy

func UpdateTCPProxy(filterChain *envoy_listener.FilterChain, updateFunc func(*envoy_tcp.TcpProxy) error) error

Types

type AccessLogConfigurer

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

type FaultInjectionConfigurer

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

func (*FaultInjectionConfigurer) Configure

func (f *FaultInjectionConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

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() *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.

type FilterChainBuilderConfig

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

FilterChainBuilderConfig holds configuration of a FilterChainBuilder.

func (*FilterChainBuilderConfig) Add

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

func FaultInjection(faultInjection *mesh_proto.FaultInjection) FilterChainBuilderOpt

func HttpAccessLog

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

func HttpConnectionManager

func HttpConnectionManager(statsName string) FilterChainBuilderOpt

func HttpInboundRoute

func HttpInboundRoute(service string, cluster envoy_common.ClusterInfo) FilterChainBuilderOpt

func HttpOutboundRoute

func HttpOutboundRoute(routeName string) FilterChainBuilderOpt

func NetworkAccessLog

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

func NetworkRBAC

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

func PrometheusEndpoint

func PrometheusEndpoint(statsName string, path string, clusterName string) FilterChainBuilderOpt

func SourceMatcher

func SourceMatcher(address string) FilterChainBuilderOpt

func TcpProxy

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

type FilterChainBuilderOptFunc

type FilterChainBuilderOptFunc func(config *FilterChainBuilderConfig)

FilterChainBuilderOptFunc is a convenience type adapter.

func (FilterChainBuilderOptFunc) ApplyTo

type FilterChainConfigurer

type FilterChainConfigurer interface {
	// Configure configures a single aspect on a given Envoy filter chain.
	Configure(filterChain *envoy_listener.FilterChain) error
}

FilterChainConfigurer is responsible for configuring a single aspect of the entire Envoy filter chain, such as TcpProxy filter, RBAC filter, access log, etc.

type HttpAccessLogConfigurer

type HttpAccessLogConfigurer struct {
	AccessLogConfigurer
}

func (*HttpAccessLogConfigurer) Configure

func (c *HttpAccessLogConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type HttpConnectionManagerConfigurer

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

func (*HttpConnectionManagerConfigurer) Configure

type HttpInboundRouteConfigurer

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

func (*HttpInboundRouteConfigurer) Configure

func (c *HttpInboundRouteConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type HttpOutboundRouteConfigurer

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

func (*HttpOutboundRouteConfigurer) Configure

func (c *HttpOutboundRouteConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type InboundListenerConfigurer

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

func (*InboundListenerConfigurer) Configure

func (c *InboundListenerConfigurer) Configure(l *v2.Listener) error

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() *ListenerBuilder

func (*ListenerBuilder) Build

func (b *ListenerBuilder) Build() (*v2.Listener, 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.
	Configurers []ListenerConfigurer
}

ListenerBuilderConfig holds configuration of a ListenerBuilder.

func (*ListenerBuilderConfig) Add

func (c *ListenerBuilderConfig) Add(configurer ListenerConfigurer)

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

func FilterChain(builder *FilterChainBuilder) ListenerBuilderOpt

func InboundListener

func InboundListener(listenerName string, address string, port uint32) ListenerBuilderOpt

func OriginalDstForwarder

func OriginalDstForwarder() ListenerBuilderOpt

func OutboundListener

func OutboundListener(listenerName string, address string, port uint32) ListenerBuilderOpt

type ListenerBuilderOptFunc

type ListenerBuilderOptFunc func(config *ListenerBuilderConfig)

ListenerBuilderOptFunc is a convenience type adapter.

func (ListenerBuilderOptFunc) ApplyTo

func (f ListenerBuilderOptFunc) ApplyTo(config *ListenerBuilderConfig)

type ListenerConfigurer

type ListenerConfigurer interface {
	// Configure configures a single aspect on a given Envoy listener.
	Configure(listener *v2.Listener) error
}

ListenerConfigurer is responsible for configuring a single aspect of the entire Envoy listener, such as filter chain, transparent proxying, etc.

type ListenerFilterChainConfigurer

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

func (ListenerFilterChainConfigurer) Configure

func (c ListenerFilterChainConfigurer) Configure(listener *v2.Listener) error

type NetworkAccessLogConfigurer

type NetworkAccessLogConfigurer struct {
	AccessLogConfigurer
}

func (*NetworkAccessLogConfigurer) Configure

func (c *NetworkAccessLogConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type NetworkRBACConfigurer

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

func (*NetworkRBACConfigurer) Configure

func (c *NetworkRBACConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type OriginalDstForwarderConfigurer

type OriginalDstForwarderConfigurer struct {
}

func (*OriginalDstForwarderConfigurer) Configure

type OutboundListenerConfigurer

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

func (*OutboundListenerConfigurer) Configure

func (c *OutboundListenerConfigurer) Configure(l *v2.Listener) error

type PrometheusEndpointConfigurer

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

func (*PrometheusEndpointConfigurer) Configure

func (c *PrometheusEndpointConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type ServerSideMTLSConfigurer

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

func (*ServerSideMTLSConfigurer) Configure

func (c *ServerSideMTLSConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type SourceMatcherConfigurer

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

func (*SourceMatcherConfigurer) Configure

func (c *SourceMatcherConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type TcpProxyConfigurer

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

func (*TcpProxyConfigurer) Configure

func (c *TcpProxyConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type TracingConfigurer

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

func (*TracingConfigurer) Configure

func (c *TracingConfigurer) Configure(filterChain *envoy_listener.FilterChain) error

type TrafficDirection

type TrafficDirection string
const (
	TrafficDirectionOutbound    TrafficDirection = "OUTBOUND"
	TrafficDirectionInbound     TrafficDirection = "INBOUND"
	TrafficDirectionUnspecified TrafficDirection = "UNSPECIFIED"
)

type TransparentProxyingConfigurer

type TransparentProxyingConfigurer struct {
}

func (*TransparentProxyingConfigurer) Configure

Jump to

Keyboard shortcuts

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