ratelimiter

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 4 Imported by: 25

Documentation

Index

Constants

View Source
const DefaultProviderRPS = 1

DefaultProviderRPS is the recommended default average requeues per second tolerated by a provider's controller manager.

Variables

This section is empty.

Functions

func NewDefaultManagedRateLimiter

func NewDefaultManagedRateLimiter(provider ratelimiter.RateLimiter) ratelimiter.RateLimiter

NewDefaultManagedRateLimiter returns a rate limiter that takes the maximum delay between the passed provider and a per-item exponential backoff limiter. The exponential backoff limiter has a base delay of 1s and a maximum of 60s.

func NewDefaultProviderRateLimiter

func NewDefaultProviderRateLimiter(rps int) *workqueue.BucketRateLimiter

NewDefaultProviderRateLimiter returns a token bucket rate limiter meant for limiting the number of average total requeues per second for all controllers registered with a controller manager. The bucket size is a linear function of the requeues per second.

Types

This section is empty.

Jump to

Keyboard shortcuts

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