Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PathMatchTypeMap = map[gatewayapiv1.PathMatchType]PatternOperator{ gatewayapiv1.PathMatchExact: PatternOperator(kuadrantv1beta2.EqualOperator), gatewayapiv1.PathMatchPathPrefix: PatternOperator(kuadrantv1beta2.StartsWithOperator), gatewayapiv1.PathMatchRegularExpression: PatternOperator(kuadrantv1beta2.MatchesOperator), } )
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct { // All the expressions defined must match to match this condition // +optional AllOf []PatternExpression `json:"allOf,omitempty"` }
Condition defines traffic matching rules
type DataItem ¶
type DataItem struct { // +optional Static *StaticSpec `json:"static,omitempty"` // +optional Selector *SelectorSpec `json:"selector,omitempty"` }
TODO implement one of constraint Precisely one of "static", "selector" must be set.
type FailureModeType ¶
type FailureModeType string
+kubebuilder:validation:Enum:=deny;allow
const ( FailureModeDeny FailureModeType = "deny" FailureModeAllow FailureModeType = "allow" )
type PatternExpression ¶
type PatternExpression struct { // Selector of an attribute from the contextual properties provided by kuadrant // during request and connection processing Selector kuadrantv1beta2.ContextSelector `json:"selector"` // The binary operator to be applied to the content fetched from context, for comparison with "value". // Possible values are: "eq" (equal to), "neq" (not equal to), "incl" (includes; for arrays), "excl" (excludes; for arrays), "matches" (regex) // TODO build comprehensive list of operators Operator PatternOperator `json:"operator"` // The value of reference for the comparison with the content fetched from the context. Value string `json:"value"` }
type PatternOperator ¶
type PatternOperator kuadrantv1beta2.WhenConditionOperator
type Plugin ¶
type Plugin struct { FailureMode FailureModeType `json:"failureMode"` RateLimitPolicies []RateLimitPolicy `json:"rateLimitPolicies"` }
type RateLimitPolicy ¶
type Rule ¶
type Rule struct { // +optional Conditions []Condition `json:"conditions,omitempty"` // +optional Data []DataItem `json:"data,omitempty"` }
Rule defines one rate limit configuration. When conditions are met, it uses `data` section to generate one RLS descriptor.
type SelectorSpec ¶
type SelectorSpec struct { // Selector of an attribute from the contextual properties provided by kuadrant // during request and connection processing Selector kuadrantv1beta2.ContextSelector `json:"selector"` // If not set it defaults to `selector` field value as the descriptor key. // +optional Key *string `json:"key,omitempty"` // An optional value to use if the selector is not found in the context. // If not set and the selector is not found in the context, then no descriptor is generated. // +optional Default *string `json:"default,omitempty"` }
type StaticSpec ¶
Click to show internal directories.
Click to hide internal directories.