Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertActions(ctx context.Context, actions []*solo_rl.Action) []*envoy_config_route_v3.RateLimit_Action
- func DetermineFilterStage(rateLimitBeforeAuth bool) plugins.FilterStage
- func GenerateEnvoyConfigForFilterWith(upstreamRef *core.ResourceRef, domain string, currentState uint32, ...) *envoyratelimit.RateLimit
- type Plugin
- func (p *Plugin) HttpFilters(_ plugins.Params, listener *v1.HttpListener) ([]plugins.StagedHttpFilter, error)
- func (p *Plugin) Init(params plugins.InitParams) error
- 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
Constants ¶
View Source
const ( ExtensionName = "rate-limit" EnvoyExtensionName = "envoy-rate-limit" CustomDomain = "custom" CustomStage = 1 )
View Source
const SetDescriptorValue = "solo.setDescriptor.uniqueValue"
special value for generic keys that signals the enterprise rate limit server to treat those descriptors differently (for the set-style rate-limit API)
Variables ¶
View Source
var (
DefaultTimeout = prototime.DurationToProto(100 * time.Millisecond)
)
Functions ¶
func ConvertActions ¶
func ConvertActions(ctx context.Context, actions []*solo_rl.Action) []*envoy_config_route_v3.RateLimit_Action
func DetermineFilterStage ¶ added in v0.21.1
func DetermineFilterStage(rateLimitBeforeAuth bool) plugins.FilterStage
figure out what stage the rate limit plugin should run in given some configuration
func GenerateEnvoyConfigForFilterWith ¶
func GenerateEnvoyConfigForFilterWith( upstreamRef *core.ResourceRef, domain string, currentState uint32, timeout *duration.Duration, denyOnFail bool, ) *envoyratelimit.RateLimit
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) HttpFilters ¶
func (p *Plugin) HttpFilters(_ plugins.Params, listener *v1.HttpListener) ([]plugins.StagedHttpFilter, error)
func (*Plugin) ProcessRoute ¶
func (p *Plugin) ProcessRoute(params plugins.RouteParams, in *v1.Route, out *envoy_config_route_v3.Route) error
func (*Plugin) ProcessVirtualHost ¶
func (p *Plugin) ProcessVirtualHost( params plugins.VirtualHostParams, in *v1.VirtualHost, out *envoy_config_route_v3.VirtualHost, ) error
Click to show internal directories.
Click to hide internal directories.