rlptools

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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 LimitNameToLimitadorIdentifier(uniqueLimitName string) string

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 WASMPluginFromStruct(structure *_struct.Struct) (*wasm.Plugin, error)

func WASMPluginMutator

func WASMPluginMutator(existingObj, desiredObj client.Object) (bool, error)

func WasmRules added in v0.4.0

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 RateLimitIndexKey = client.ObjectKey

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

type WasmRulesByDomain map[string][]wasm.Rule

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL