Documentation
¶
Index ¶
- Constants
- type Option
- type Plugin
- func (p *Plugin) Execute(ctx context.Context, in appplugins.ExecInput) (*appplugins.Result, error)
- func (p *Plugin) MandatoryStages() []policy.Stage
- func (p *Plugin) MutatesMetadata() bool
- func (p *Plugin) MutatesRequestBody() bool
- func (p *Plugin) MutatesResponseBody() bool
- func (p *Plugin) Name() string
- func (p *Plugin) SupportedModes() []policy.Mode
- func (p *Plugin) SupportedStages() []policy.Stage
- func (p *Plugin) ValidateConfig(settings map[string]any) error
- type RateLimiterData
Constants ¶
View Source
const PluginName = "rate_limiter"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Execute ¶
func (p *Plugin) Execute(ctx context.Context, in appplugins.ExecInput) (*appplugins.Result, error)
func (*Plugin) MandatoryStages ¶
func (*Plugin) MutatesMetadata ¶ added in v0.2.3
func (*Plugin) MutatesRequestBody ¶ added in v0.2.3
func (*Plugin) MutatesResponseBody ¶ added in v0.2.3
func (*Plugin) SupportedModes ¶
func (*Plugin) SupportedStages ¶
type RateLimiterData ¶
type RateLimiterData struct {
RateLimitExceeded bool `json:"rate_limit_exceeded"`
ExceededType string `json:"exceeded_type,omitempty"`
RetryAfter string `json:"retry_after,omitempty"`
CurrentCount int64 `json:"current_count"`
Limit int `json:"limit"`
Window string `json:"window,omitempty"`
}
RateLimiterData is the per-invocation trace payload describing the evaluated rate-limit window and whether it was exceeded.
Click to show internal directories.
Click to hide internal directories.