controllerutil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWaitForCacheSyncTimeout = errors.New("timed out while waiting for cache to sync")
)

Functions

func GetConcurrencyOrDefaultCPUFactor

func GetConcurrencyOrDefaultCPUFactor(concurrency *configv1alpha1.Concurrency, defaultFactor int) int

GetConcurrencyOrDefaultCPUFactor returns the configured concurrency, or a default factor on the number of CPUs.

func GetConcurrencyOrDefaultNumber

func GetConcurrencyOrDefaultNumber(concurrency *configv1alpha1.Concurrency, defaultNumber int) int

GetConcurrencyOrDefaultNumber returns the configured concurrency, or a default number.

func WaitForNamedCacheSyncWithTimeout

func WaitForNamedCacheSyncWithTimeout(
	ctx context.Context, controllerName string, timeout time.Duration, cacheSyncs ...cache.InformerSynced,
) error

WaitForNamedCacheSyncWithTimeout is a wrapper around WaitForNamedCacheSync subject to a maximum timeout. Returns whether there was a successful or failed sync.

Types

This section is empty.

Jump to

Keyboard shortcuts

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