ratelimit

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 10 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 RateLimits) *Limiter

func (*Limiter) RoundTrip

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

type RateLimit

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

type RateLimits

type RateLimits []*RateLimit

func ConfigureRateLimits

func ConfigureRateLimits(ctx context.Context, limits config.RateLimits, logger *logrus.Entry) (RateLimits, error)

Jump to

Keyboard shortcuts

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