routes

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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(apiVersion envoy.APIVersion) *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.
	ConfigurersV3 []v3.RouteConfigurationConfigurer
}

RouteConfigurationBuilderConfig holds configuration of a RouteConfigurationBuilder.

func (*RouteConfigurationBuilderConfig) AddV3

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 RouteConfigurationVirtualHostConfigurerV3

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

func (RouteConfigurationVirtualHostConfigurerV3) 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(apiVersion envoy.APIVersion) *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.
	ConfigurersV3 []v3.VirtualHostConfigurer
}

VirtualHostBuilderConfig holds configuration of a VirtualHostBuilder.

func (*VirtualHostBuilderConfig) AddV3

func (c *VirtualHostBuilderConfig) AddV3(configurer v3.VirtualHostConfigurer)

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 Redirect

func Redirect(matchPath, newPath string, allowGetOnly bool, port uint32) VirtualHostBuilderOpt

Redirect for paths that match to matchPath returns 301 status code with new port and path

func Route

func Route(matchPath, newPath, cluster string, allowGetOnly bool) VirtualHostBuilderOpt

type VirtualHostBuilderOptFunc

type VirtualHostBuilderOptFunc func(config *VirtualHostBuilderConfig)

VirtualHostBuilderOptFunc is a convenience type adapter.

func (VirtualHostBuilderOptFunc) ApplyTo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳