Documentation ¶
Index ¶
- Constants
- Variables
- func Equal(a, b RateLimitList) bool
- func LimitNameToLimitadorIdentifier(uniqueLimitName string) string
- func LimitadorRateLimitsFromRLP(rlp *kuadrantv1beta2.RateLimitPolicy) []limitadorv1alpha1.RateLimit
- func LimitsNamespaceFromRLP(rlp *kuadrantv1beta2.RateLimitPolicy) string
- func WASMPluginFromStruct(structure *_struct.Struct) (*wasm.Plugin, error)
- func WASMPluginMutator(existingObj, desiredObj client.Object) (bool, error)
- func WasmRules(rlp *kuadrantv1beta2.RateLimitPolicy, route *gatewayapiv1beta1.HTTPRoute) []wasm.Rule
- type RateLimitIndex
- type RateLimitIndexKey
- type RateLimitList
- type WasmRulesByDomain
Constants ¶
View Source
const (
LimitadorRateLimitIdentifierPrefix = "limit."
)
Variables ¶
View Source
var (
WASMFilterImageURL = env.GetString("RELATED_IMAGE_WASMSHIM", "oci://quay.io/kuadrant/wasm-shim:latest")
)
Functions ¶
func Equal ¶ added in v0.4.0
func Equal(a, b RateLimitList) bool
func LimitNameToLimitadorIdentifier ¶ added in v0.4.0
func LimitadorRateLimitsFromRLP ¶ added in v0.4.0
func LimitadorRateLimitsFromRLP(rlp *kuadrantv1beta2.RateLimitPolicy) []limitadorv1alpha1.RateLimit
LimitadorRateLimitsFromRLP converts rate limits from a Kuadrant RateLimitPolicy into a list of Limitador rate limit objects
func LimitsNamespaceFromRLP ¶ added in v0.4.0
func LimitsNamespaceFromRLP(rlp *kuadrantv1beta2.RateLimitPolicy) string
func WASMPluginFromStruct ¶
func WASMPluginMutator ¶
func WasmRules ¶ added in v0.4.0
func WasmRules(rlp *kuadrantv1beta2.RateLimitPolicy, route *gatewayapiv1beta1.HTTPRoute) []wasm.Rule
WasmRules computes WASM rules from the policy and the targeted route. It returns an empty list of wasm rules if the policy specifies no limits or if all limits specified in the policy fail to match any route rule according to the limits route selectors.
Types ¶
type RateLimitIndex ¶ added in v0.4.0
type RateLimitIndex struct { orderedmap.OrderedMap[RateLimitIndexKey, RateLimitList] }
RateLimitIndex stores RateLimitLists by key
func NewRateLimitIndex ¶ added in v0.4.0
func NewRateLimitIndex() *RateLimitIndex
NewRateLimitIndex builds an index to manage sets of rate limits, organized by key
func (*RateLimitIndex) Set ¶ added in v0.4.0
func (l *RateLimitIndex) Set(key RateLimitIndexKey, rateLimits RateLimitList)
func (*RateLimitIndex) ToRateLimits ¶ added in v0.4.0
func (l *RateLimitIndex) ToRateLimits() RateLimitList
type RateLimitIndexKey ¶ added in v0.4.0
type RateLimitList ¶ added in v0.4.0
type RateLimitList []limitadorv1alpha1.RateLimit
func (RateLimitList) Len ¶ added in v0.4.0
func (l RateLimitList) Len() int
func (RateLimitList) Less ¶ added in v0.4.0
func (l RateLimitList) Less(i, j int) bool
func (RateLimitList) Swap ¶ added in v0.4.0
func (l RateLimitList) Swap(i, j int)
type WasmRulesByDomain ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.