ratelimit

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	sync.RWMutex
	orderedmap.OrderedMap[string, LimitadorRateLimits]
}

Index stores LimitadorRateLimitss by key

func NewIndex

func NewIndex() *Index

NewIndex builds an index to manage sets of rate limits, organized by key

func (*Index) Set

func (l *Index) Set(key string, rateLimits LimitadorRateLimits)

func (*Index) ToRateLimits

func (l *Index) ToRateLimits() LimitadorRateLimits

type LimitadorRateLimits

type LimitadorRateLimits []limitadorv1alpha1.RateLimit

func (LimitadorRateLimits) EqualTo

func (l LimitadorRateLimits) EqualTo(other LimitadorRateLimits) bool

func (LimitadorRateLimits) Len

func (l LimitadorRateLimits) Len() int

func (LimitadorRateLimits) Less

func (l LimitadorRateLimits) Less(i, j int) bool

func (LimitadorRateLimits) Swap

func (l LimitadorRateLimits) Swap(i, j int)

Jump to

Keyboard shortcuts

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