github_ratelimit_test

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RateLimitInjecterEvery    = "SECONDARY_RATE_LIMIT_INJECTER_EVERY"
	RateLimitInjecterDuration = "SECONDARY_RATE_LIMIT_INJECTER_DURATION"
)

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
}

func (*SecondaryRateLimitInjecterOptions) IsNoop

func (*SecondaryRateLimitInjecterOptions) Validate

Jump to

Keyboard shortcuts

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