throttle

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Limiter

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

func NewLimiter

func NewLimiter(transport http.RoundTripper, limits Throttles) *Limiter

NewLimiter creates a new Limiter. See Throttle for configuration options.

func (*Limiter) RoundTrip

func (l *Limiter) RoundTrip(req *http.Request) (*http.Response, error)

type Throttle

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

Throttle represents a throttle configuration.

type Throttles

type Throttles []*Throttle

func ConfigureThrottles

func ConfigureThrottles(ctx context.Context, limits config.Throttles, logger *logrus.Entry) (Throttles, error)

Jump to

Keyboard shortcuts

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