Documentation ¶
Index ¶
- Constants
- Variables
- func TranslateTransformation(glooTransform *transformation.Transformation, ...) (*envoytransformation.Transformation, error)
- type ExtractorError
- type Plugin
- func (p *Plugin) ConvertTransformation(ctx context.Context, t *transformation.Transformations, ...) (*envoytransformation.RouteTransformations, error)
- func (p *Plugin) HttpFilters(params plugins.Params, listener *v1.HttpListener) ([]plugins.StagedHttpFilter, error)
- func (p *Plugin) Init(params plugins.InitParams)
- func (p *Plugin) Name() string
- func (p *Plugin) ProcessRoute(params plugins.RouteParams, in *v1.Route, out *envoy_config_route_v3.Route) error
- func (p *Plugin) ProcessVirtualHost(params plugins.VirtualHostParams, in *v1.VirtualHost, ...) error
- func (p *Plugin) ProcessWeightedDestination(params plugins.RouteParams, in *v1.WeightedDestination, ...) error
- func (p *Plugin) UpstreamHttpFilters(params plugins.Params, listener *v1.HttpListener) ([]plugins.StagedUpstreamHttpFilter, error)
- type TranslateTransformationFn
Constants ¶
View Source
const ( ExtensionName = "transformation" FilterName = "io.solo.transformation" WaitFilterName = "io.solo.wait" RegularStageNumber = 0 EarlyStageNumber = 1 AwsStageNumber = 2 PostRoutingNumber = 3 )
View Source
const ( ErrMsgReplacementTextSetWhenNotNeeded = "replacement text should not be set" ErrMsgReplacementTextNotSetWhenNeeded = "replacement text must be set" ErrMsgSubgroupSetWhenNotNeeded = "subgroup should not be set" )
Variables ¶
View Source
var ( UnknownTransformationType = func(transformation interface{}) error { return fmt.Errorf("unknown transformation type %T", transformation) } )
Functions ¶
func TranslateTransformation ¶ added in v1.7.7
func TranslateTransformation(glooTransform *transformation.Transformation, settingsEscapeCharacters *wrapperspb.BoolValue, stagedEscapeCharacters *wrapperspb.BoolValue) (*envoytransformation.Transformation, error)
Types ¶
type ExtractorError ¶ added in v1.15.24
type ExtractorError struct { Message string // The error message Name string // The name of the extractor causing the error Mode string // (optional) The (stringified) mode of the extractor causing the error }
ExtractorError represents an error related to extractor configuration.
func NewExtractorError ¶ added in v1.15.24
func NewExtractorError(message, name string, mode transformation.Extraction_Mode) *ExtractorError
Helper functions to create specific ExtractorError instances.
func (*ExtractorError) Error ¶ added in v1.15.24
func (e *ExtractorError) Error() string
implements the error interface for ExtractorError.
type Plugin ¶
type Plugin struct { RequireEarlyTransformation bool TranslateTransformation TranslateTransformationFn // contains filtered or unexported fields }
This Plugin is exported only because it is utilized by the enterprise implementation We would prefer if the plugin were not exported and instead the required translation methods were exported.
func (*Plugin) ConvertTransformation ¶ added in v1.14.8
func (p *Plugin) ConvertTransformation( ctx context.Context, t *transformation.Transformations, stagedTransformations *transformation.TransformationStages, ) (*envoytransformation.RouteTransformations, error)
func (*Plugin) HttpFilters ¶
func (p *Plugin) HttpFilters(params plugins.Params, listener *v1.HttpListener) ([]plugins.StagedHttpFilter, error)
HttpFilters emits the desired set of filters. Either 0, 1 or if earlytransformation is needed then 2 staged filters
func (*Plugin) Init ¶
func (p *Plugin) Init(params plugins.InitParams)
Init attempts to set the plugin back to a clean slate state.
func (*Plugin) ProcessRoute ¶
func (p *Plugin) ProcessRoute(params plugins.RouteParams, in *v1.Route, out *envoy_config_route_v3.Route) error
func (*Plugin) ProcessVirtualHost ¶ added in v0.18.28
func (p *Plugin) ProcessVirtualHost( params plugins.VirtualHostParams, in *v1.VirtualHost, out *envoy_config_route_v3.VirtualHost, ) error
func (*Plugin) ProcessWeightedDestination ¶ added in v0.18.28
func (p *Plugin) ProcessWeightedDestination( params plugins.RouteParams, in *v1.WeightedDestination, out *envoy_config_route_v3.WeightedCluster_ClusterWeight, ) error
func (*Plugin) UpstreamHttpFilters ¶ added in v1.17.0
func (p *Plugin) UpstreamHttpFilters(params plugins.Params, listener *v1.HttpListener) ([]plugins.StagedUpstreamHttpFilter, error)
type TranslateTransformationFn ¶ added in v1.7.7
type TranslateTransformationFn func(*transformation.Transformation, *wrapperspb.BoolValue, *wrapperspb.BoolValue) (*envoytransformation.Transformation, error)
Click to show internal directories.
Click to hide internal directories.