restcfg

package
v0.0.0-...-2e8aeb9 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 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 SetRateLimiterWithCustomParamenters

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

SetRateLimiterWithCustomParamenters 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