Documentation
¶
Index ¶
- func FilterStageComparison(a, b FilterStage) int
- type ClusterGeneratorPlugin
- type FilterStage
- type HttpFilterPlugin
- type InitParams
- type ListenerFilterChainPlugin
- type ListenerFilterPlugin
- type ListenerPlugin
- type Params
- type Plugin
- type RouteActionParams
- type RouteActionPlugin
- type RouteParams
- type RoutePlugin
- type StagedHttpFilter
- type StagedHttpFilterList
- type StagedListenerFilter
- type StagedListenerFilterList
- type UpstreamPlugin
- type VirtualHostParams
- type VirtualHostPlugin
- type WeightedDestinationPlugin
- type WellKnownFilterStage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterStageComparison ¶
func FilterStageComparison(a, b FilterStage) int
FilterStageComparison helps implement the sort.Interface Less function for use in other implementations of sort.Interface returns -1 if less than, 0 if equal, 1 if greater than It is not sufficient to return a Less bool because calling functions need to know if equal or greater when Less is false
Types ¶
type ClusterGeneratorPlugin ¶
type ClusterGeneratorPlugin interface { Plugin GeneratedClusters(params Params) ([]*envoyapi.Cluster, error) }
Generation plugins
type FilterStage ¶
type FilterStage struct { RelativeTo WellKnownFilterStage Weight int }
func AfterStage ¶
func AfterStage(wellKnown WellKnownFilterStage) FilterStage
func BeforeStage ¶
func BeforeStage(wellKnown WellKnownFilterStage) FilterStage
func DuringStage ¶
func DuringStage(wellKnown WellKnownFilterStage) FilterStage
func RelativeToStage ¶
func RelativeToStage(wellKnown WellKnownFilterStage, weight int) FilterStage
type HttpFilterPlugin ¶
type HttpFilterPlugin interface { Plugin HttpFilters(params Params, listener *v1.HttpListener) ([]StagedHttpFilter, error) }
type InitParams ¶
type ListenerFilterChainPlugin ¶
type ListenerFilterChainPlugin interface { Plugin ProcessListenerFilterChain(params Params, in *v1.Listener) ([]envoylistener.FilterChain, error) }
Currently only supported for TCP listeners, plan to change this in the future
type ListenerFilterPlugin ¶
type ListenerPlugin ¶
type Plugin ¶
type Plugin interface {
Init(params InitParams) error
}
type RouteActionParams ¶
type RouteActionParams struct { RouteParams Route *v1.Route }
type RouteActionPlugin ¶
type RouteActionPlugin interface { Plugin ProcessRouteAction(params RouteActionParams, inAction *v1.RouteAction, out *envoyroute.RouteAction) error }
note: any route action plugin can be implemented as a route plugin suggestion: if your plugin requires configuration from a RoutePlugin field, implement the RoutePlugin interface
type RouteParams ¶
type RouteParams struct { VirtualHostParams VirtualHost *v1.VirtualHost }
type RoutePlugin ¶
type RoutePlugin interface { Plugin ProcessRoute(params RouteParams, in *v1.Route, out *envoyroute.Route) error }
type StagedHttpFilter ¶
type StagedHttpFilter struct { HttpFilter *envoyhttp.HttpFilter Stage FilterStage }
func NewStagedFilter ¶
func NewStagedFilter(name string, stage FilterStage) StagedHttpFilter
func NewStagedFilterWithConfig ¶
func NewStagedFilterWithConfig(name string, config proto.Message, stage FilterStage) (StagedHttpFilter, error)
type StagedHttpFilterList ¶
type StagedHttpFilterList []StagedHttpFilter
func (StagedHttpFilterList) Len ¶
func (s StagedHttpFilterList) Len() int
func (StagedHttpFilterList) Less ¶
func (s StagedHttpFilterList) Less(i, j int) bool
filters by Relative Stage, Weighting, Name, and (to ensure stability) index
func (StagedHttpFilterList) Swap ¶
func (s StagedHttpFilterList) Swap(i, j int)
type StagedListenerFilter ¶
type StagedListenerFilter struct { ListenerFilter envoylistener.Filter Stage FilterStage }
type StagedListenerFilterList ¶
type StagedListenerFilterList []StagedListenerFilter
func (StagedListenerFilterList) Len ¶
func (s StagedListenerFilterList) Len() int
func (StagedListenerFilterList) Less ¶
func (s StagedListenerFilterList) Less(i, j int) bool
filters by Relative Stage, Weighting, Name, and (to ensure stability) index
func (StagedListenerFilterList) Swap ¶
func (s StagedListenerFilterList) Swap(i, j int)
type UpstreamPlugin ¶
type VirtualHostParams ¶
type VirtualHostPlugin ¶
type VirtualHostPlugin interface { Plugin ProcessVirtualHost(params VirtualHostParams, in *v1.VirtualHost, out *envoyroute.VirtualHost) error }
type WeightedDestinationPlugin ¶
type WeightedDestinationPlugin interface { Plugin ProcessWeightedDestination(params RouteParams, in *v1.WeightedDestination, out *envoyroute.WeightedCluster_ClusterWeight) error }
type WellKnownFilterStage ¶
type WellKnownFilterStage int
WellKnownFilterStages are represented by an integer that reflects their relative ordering
const ( FaultStage WellKnownFilterStage = iota // Fault injection // First Filter Stage CorsStage // Cors stage WafStage // Web application firewall stage AuthNStage // Authentication stage AuthZStage // Authorization stage RateLimitStage // Rate limiting stage AcceptedStage // Request passed all the checks and will be forwarded upstream OutAuthStage // Add auth for the upstream (i.e. aws λ) RouteStage // Request is going to upstream // Last Filter Stage )
If new well known filter stages are added, they should be inserted in a position corresponding to their order