restcfg

package
v0.11.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package restcfg contains utility functions to deal with rest configs.

Index

Constants

View Source
const (
	// DefaultClientTimeout -> The default timeout value assigned to client-go clients.
	DefaultClientTimeout = 10 * time.Second
	// 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, timeout time.Duration, 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