limiter

package
v0.43.5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RateLimiter

type RateLimiter struct {
	// contains filtered or unexported fields
}

RateLimiter limits reconcile callback calls

func NewRateLimiter

func NewRateLimiter(limiterName string, limit int64) *RateLimiter

NewRateLimiter returns limiter with limit per 2 seconds

func (*RateLimiter) MustThrottleReconcile

func (rt *RateLimiter) MustThrottleReconcile() bool

MustThrottleReconcile registers reconcile event and checks if it must be throttled

Jump to

Keyboard shortcuts

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