Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertActions(actions []*gloorl.Action) []*envoyvhostratelimit.RateLimit_Action
- func GenerateEnvoyConfigForFilterWith(ref core.ResourceRef, domain string, currentState uint32, ...) *envoyratelimit.RateLimit
- type Plugin
- func (p *Plugin) HttpFilters(params 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 *envoyroute.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" DefaultTimeout = 100 * time.Millisecond FilterName = "envoy.rate_limit" )
Variables ¶
View Source
var ( // rate limiting should happen after auth DefaultFilterStage = plugins.DuringStage(plugins.RateLimitStage) // we may want to rate limit before executing the AuthN and AuthZ stages // notably, AuthZ still needs to occur after AuthN BeforeAuthStage = plugins.BeforeStage(plugins.AuthNStage) )
Functions ¶
func ConvertActions ¶
func ConvertActions(actions []*gloorl.Action) []*envoyvhostratelimit.RateLimit_Action
func GenerateEnvoyConfigForFilterWith ¶
func GenerateEnvoyConfigForFilterWith(ref core.ResourceRef, domain string, currentState uint32, timeout *time.Duration, denyOnFail bool) *envoyratelimit.RateLimit
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) HttpFilters ¶
func (p *Plugin) HttpFilters(params plugins.Params, listener *v1.HttpListener) ([]plugins.StagedHttpFilter, error)
func (*Plugin) ProcessRoute ¶
func (p *Plugin) ProcessRoute(params plugins.RouteParams, in *v1.Route, out *envoyroute.Route) error
func (*Plugin) ProcessVirtualHost ¶
func (p *Plugin) ProcessVirtualHost(params plugins.VirtualHostParams, in *v1.VirtualHost, out *envoyroute.VirtualHost) error
Click to show internal directories.
Click to hide internal directories.