Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertActions(ctx context.Context, actions []*solo_rl.Action) []*envoy_config_route_v3.RateLimit_Action
- func GenerateEnvoyConfigForFilterWith(upstreamRef *core.ResourceRef, domain string, stage uint32, ...) *envoyratelimit.RateLimit
- func GenerateEnvoyHttpFilterConfig(serverSettings *ratelimit.Settings) *envoy_extensions_filters_http_ratelimit_v3.RateLimit
- func GetFilterStageForRateLimitStage(rateLimitStage uint32) plugins.FilterStage
- func GetRateLimitStageForServerSettings(serverSettings *ratelimit.Settings) uint32
- func NewPlugin() *plugin
Constants ¶
View Source
const ( ExtensionName = "rate_limit" CustomDomain = "custom" RequestType = "both" CustomStage = uint32(1) CustomStageBeforeAuth = uint32(3) )
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 ( // 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) DefaultTimeout = prototime.DurationToProto(100 * time.Millisecond) ServerNotFound = func(usRef *core.ResourceRef) error { return eris.Errorf("ratelimit server upstream not found %s", usRef.String()) } )
Functions ¶
func ConvertActions ¶
func ConvertActions(ctx context.Context, actions []*solo_rl.Action) []*envoy_config_route_v3.RateLimit_Action
func GenerateEnvoyConfigForFilterWith ¶
func GenerateEnvoyConfigForFilterWith( upstreamRef *core.ResourceRef, domain string, stage uint32, timeout *duration.Duration, denyOnFail bool, enableXRatelimitHeaders bool, ) *envoyratelimit.RateLimit
func GenerateEnvoyHttpFilterConfig ¶ added in v1.9.25
func GenerateEnvoyHttpFilterConfig(serverSettings *ratelimit.Settings) *envoy_extensions_filters_http_ratelimit_v3.RateLimit
func GetFilterStageForRateLimitStage ¶ added in v1.9.25
func GetFilterStageForRateLimitStage(rateLimitStage uint32) plugins.FilterStage
func GetRateLimitStageForServerSettings ¶ added in v1.9.25
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.