routes

package
v0.0.0-...-7b34d14 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TagsHeaderName = "x-kuma-tags"

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonRouteConfigurationConfigurer

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

func (CommonRouteConfigurationConfigurer) Configure

func (c CommonRouteConfigurationConfigurer) Configure(routeConfiguration *v2.RouteConfiguration) error

type CommonVirtualHostConfigurer

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

func (CommonVirtualHostConfigurer) Configure

func (c CommonVirtualHostConfigurer) Configure(virtualHost *envoy_route.VirtualHost) error

type DefaultRouteConfigurer

type DefaultRouteConfigurer struct {
	RouteConfigurer
}

func (DefaultRouteConfigurer) Configure

func (c DefaultRouteConfigurer) Configure(virtualHost *envoy_route.VirtualHost) error

type ResetTagsHeaderConfigurer

type ResetTagsHeaderConfigurer struct {
}

func (*ResetTagsHeaderConfigurer) Configure

type RouteConfigurationBuilder

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

RouteConfigurationBuilder is responsible for generating an Envoy RouteConfiguration by applying a series of RouteConfigurationConfigurers.

func NewRouteConfigurationBuilder

func NewRouteConfigurationBuilder() *RouteConfigurationBuilder

func (*RouteConfigurationBuilder) Build

Build generates an Envoy RouteConfiguration by applying a series of RouteConfigurationConfigurers.

func (*RouteConfigurationBuilder) Configure

Configure configures RouteConfigurationBuilder by adding individual RouteConfigurationConfigurers.

type RouteConfigurationBuilderConfig

type RouteConfigurationBuilderConfig struct {
	// A series of RouteConfigurationConfigurers to apply to Envoy RouteConfiguration.
	Configurers []RouteConfigurationConfigurer
}

RouteConfigurationBuilderConfig holds configuration of a RouteConfigurationBuilder.

func (*RouteConfigurationBuilderConfig) Add

Add appends a given RouteConfigurationConfigurer to the end of the chain.

type RouteConfigurationBuilderOpt

type RouteConfigurationBuilderOpt interface {
	// ApplyTo adds RouteConfigurationConfigurer(s) to the RouteConfigurationBuilder.
	ApplyTo(config *RouteConfigurationBuilderConfig)
}

RouteConfigurationBuilderOpt is a configuration option for RouteConfigurationBuilder.

The goal of RouteConfigurationBuilderOpt is to facilitate fluent RouteConfigurationBuilder API.

func CommonRouteConfiguration

func CommonRouteConfiguration(name string) RouteConfigurationBuilderOpt

func ResetTagsHeader

func ResetTagsHeader() RouteConfigurationBuilderOpt

ResetTagsHeader adds x-kuma-tags header to the RequestHeadersToRemove list. x-kuma-tags header is planned to be used internally, so we don't want to expose it to the destination application.

type RouteConfigurationBuilderOptFunc

type RouteConfigurationBuilderOptFunc func(config *RouteConfigurationBuilderConfig)

RouteConfigurationBuilderOptFunc is a convenience type adapter.

func (RouteConfigurationBuilderOptFunc) ApplyTo

type RouteConfigurationConfigurer

type RouteConfigurationConfigurer interface {
	// Configure configures a single aspect on a given Envoy RouteConfiguration.
	Configure(routeConfiguration *v2.RouteConfiguration) error
}

RouteConfigurationConfigurer is responsible for configuring a single aspect of the entire Envoy RouteConfiguration, such as VirtualHost, HTTP headers to add or remove, etc.

type RouteConfigurationVirtualHostConfigurer

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

func (RouteConfigurationVirtualHostConfigurer) Configure

func (c RouteConfigurationVirtualHostConfigurer) Configure(routeConfiguration *v2.RouteConfiguration) error

type RouteConfigurer

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

type TagsHeaderConfigurer

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

func (*TagsHeaderConfigurer) Configure

type VirtualHostBuilder

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

VirtualHostBuilder is responsible for generating an Envoy VirtualHost by applying a series of VirtualHostConfigurers.

func NewVirtualHostBuilder

func NewVirtualHostBuilder() *VirtualHostBuilder

func (*VirtualHostBuilder) Build

Build generates an Envoy VirtualHost by applying a series of VirtualHostConfigurers.

func (*VirtualHostBuilder) Configure

Configure configures VirtualHostBuilder by adding individual VirtualHostConfigurers.

type VirtualHostBuilderConfig

type VirtualHostBuilderConfig struct {
	// A series of VirtualHostConfigurers to apply to Envoy VirtualHost.
	Configurers []VirtualHostConfigurer
}

VirtualHostBuilderConfig holds configuration of a VirtualHostBuilder.

func (*VirtualHostBuilderConfig) Add

Add appends a given VirtualHostConfigurer to the end of the chain.

type VirtualHostBuilderOpt

type VirtualHostBuilderOpt interface {
	// ApplyTo adds VirtualHostConfigurer(s) to the VirtualHostBuilder.
	ApplyTo(config *VirtualHostBuilderConfig)
}

VirtualHostBuilderOpt is a configuration option for VirtualHostBuilder.

The goal of VirtualHostBuilderOpt is to facilitate fluent VirtualHostBuilder API.

func CommonVirtualHost

func CommonVirtualHost(name string) VirtualHostBuilderOpt

func DefaultRoute

func DefaultRoute(subsets ...envoy_common.ClusterSubset) VirtualHostBuilderOpt

type VirtualHostBuilderOptFunc

type VirtualHostBuilderOptFunc func(config *VirtualHostBuilderConfig)

VirtualHostBuilderOptFunc is a convenience type adapter.

func (VirtualHostBuilderOptFunc) ApplyTo

type VirtualHostConfigurer

type VirtualHostConfigurer interface {
	// Configure configures a single aspect on a given Envoy VirtualHost.
	Configure(virtualHost *envoy_route.VirtualHost) error
}

VirtualHostConfigurer is responsible for configuring a single aspect of the entire Envoy VirtualHost, such as Route, CORS, etc.

Jump to

Keyboard shortcuts

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