Documentation ¶
Index ¶
- Constants
- type CommonRouteConfigurationConfigurer
- type CommonVirtualHostConfigurer
- type DefaultRouteConfigurer
- type ResetTagsHeaderConfigurer
- type RouteConfigurationBuilder
- type RouteConfigurationBuilderConfig
- type RouteConfigurationBuilderOpt
- type RouteConfigurationBuilderOptFunc
- type RouteConfigurationConfigurer
- type RouteConfigurationVirtualHostConfigurer
- type RouteConfigurer
- type TagsHeaderConfigurer
- type VirtualHostBuilder
- type VirtualHostBuilderConfig
- type VirtualHostBuilderOpt
- type VirtualHostBuilderOptFunc
- type VirtualHostConfigurer
Constants ¶
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 ¶
func (r *ResetTagsHeaderConfigurer) Configure(rc *envoy_api_v2.RouteConfiguration) error
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 ¶
func (b *RouteConfigurationBuilder) Build() (*v2.RouteConfiguration, error)
Build generates an Envoy RouteConfiguration by applying a series of RouteConfigurationConfigurers.
func (*RouteConfigurationBuilder) Configure ¶
func (b *RouteConfigurationBuilder) Configure(opts ...RouteConfigurationBuilderOpt) *RouteConfigurationBuilder
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 ¶
func (c *RouteConfigurationBuilderConfig) Add(configurer RouteConfigurationConfigurer)
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.
func TagsHeader ¶
func TagsHeader(tags mesh_proto.MultiValueTagSet) RouteConfigurationBuilderOpt
func VirtualHost ¶
func VirtualHost(builder *VirtualHostBuilder) RouteConfigurationBuilderOpt
type RouteConfigurationBuilderOptFunc ¶
type RouteConfigurationBuilderOptFunc func(config *RouteConfigurationBuilderConfig)
RouteConfigurationBuilderOptFunc is a convenience type adapter.
func (RouteConfigurationBuilderOptFunc) ApplyTo ¶
func (f RouteConfigurationBuilderOptFunc) ApplyTo(config *RouteConfigurationBuilderConfig)
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 ¶
func (t *TagsHeaderConfigurer) Configure(rc *envoy_api_v2.RouteConfiguration) error
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 ¶
func (b *VirtualHostBuilder) Build() (*envoy_route.VirtualHost, error)
Build generates an Envoy VirtualHost by applying a series of VirtualHostConfigurers.
func (*VirtualHostBuilder) Configure ¶
func (b *VirtualHostBuilder) Configure(opts ...VirtualHostBuilderOpt) *VirtualHostBuilder
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 ¶
func (c *VirtualHostBuilderConfig) Add(configurer 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 DefaultRoute ¶
func DefaultRoute(subsets ...envoy_common.ClusterSubset) VirtualHostBuilderOpt
type VirtualHostBuilderOptFunc ¶
type VirtualHostBuilderOptFunc func(config *VirtualHostBuilderConfig)
VirtualHostBuilderOptFunc is a convenience type adapter.
func (VirtualHostBuilderOptFunc) ApplyTo ¶
func (f VirtualHostBuilderOptFunc) ApplyTo(config *VirtualHostBuilderConfig)
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.