restcfg

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package restcfg contains utility functions to deal with rest configs.

Index

Constants

View Source
const (
	// DefaultQPS -> The default QPS value assigned to client-go clients.
	DefaultQPS = uint(100)
	// DefaultBurst -> The default burst value assigned to client-go clients.
	DefaultBurst = uint(100)
)

Variables

This section is empty.

Functions

func InitFlags

func InitFlags(flagset *flag.FlagSet)

InitFlags initializes the flags to configure the rate limiter parameters.

func SetRateLimiter

func SetRateLimiter(cfg *rest.Config) *rest.Config

SetRateLimiter configures the rate limiting parameters of the given rest configuration to the values obtained from the command line parameters.

func SetRateLimiterWithCustomParameters added in v0.4.0

func SetRateLimiterWithCustomParameters(cfg *rest.Config, qps float32, burst int) *rest.Config

SetRateLimiterWithCustomParameters configures the rate limiting parameters of the given rest configuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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