loadlimiter

package
v1.35.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadLimiter

type LoadLimiter struct {
	// contains filtered or unexported fields
}

LoadLimiter is a limiter to control loading concurrency and it throttles the loading instead of rejecting. The motivation of this limiter is the fact that loading requires multiple syscalls which can create a new OS threads and might result in hitting the internal thread count limit of Go runtime.

func NewLoadLimiter

func NewLoadLimiter(reg prometheus.Registerer, name string, limit int) *LoadLimiter

func (*LoadLimiter) Acquire

func (l *LoadLimiter) Acquire(ctx context.Context) error

func (*LoadLimiter) Release

func (l *LoadLimiter) Release()

Jump to

Keyboard shortcuts

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