ratelimiterflag

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultControllerRateLimiter

func DefaultControllerRateLimiter(opts Options) workqueue.RateLimiter

DefaultControllerRateLimiter provide a default rate limiter for controller, and users can tune it by corresponding flags.

Types

type Options

type Options struct {
	// RateLimiterBaseDelay is the base delay for ItemExponentialFailureRateLimiter.
	RateLimiterBaseDelay time.Duration

	// RateLimiterMaxDelay is the max delay for ItemExponentialFailureRateLimiter.
	RateLimiterMaxDelay time.Duration

	// RateLimiterQPS is the qps for BucketRateLimiter
	RateLimiterQPS int

	// RateLimiterBucketSize is the bucket size for BucketRateLimiter
	RateLimiterBucketSize int
}

Options are options for rate limiter.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags adds flags to the specified FlagSet.

Jump to

Keyboard shortcuts

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