github_ratelimit_test

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type SecondaryRateLimitInjecter

type SecondaryRateLimitInjecter struct {
	AbuseAttempts int
	// contains filtered or unexported fields
}

func (*SecondaryRateLimitInjecter) CurrentSleepEnd

func (r *SecondaryRateLimitInjecter) CurrentSleepEnd() time.Time

func (*SecondaryRateLimitInjecter) NextSleepStart

func (r *SecondaryRateLimitInjecter) NextSleepStart() time.Time

func (*SecondaryRateLimitInjecter) RoundTrip

func (t *SecondaryRateLimitInjecter) RoundTrip(request *http.Request) (*http.Response, error)

type SecondaryRateLimitInjecterOptions

type SecondaryRateLimitInjecterOptions struct {
	Every               time.Duration
	Sleep               time.Duration
	UseXRateLimit       bool
	UsePrimaryRateLimit bool
}

func (*SecondaryRateLimitInjecterOptions) IsNoop

func (*SecondaryRateLimitInjecterOptions) Validate

Jump to

Keyboard shortcuts

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