ratelimit

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 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 RateLimits) *Limiter

NewLimiter creates a new Rate Limiter. See RateLimit for configuration options.

func (*Limiter) RoundTrip

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

type RateLimit

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

RateLimit represents a rate limit configuration.

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