Documentation
¶
Index ¶
Constants ¶
View Source
const (
InvalidBodyContent = `{"message": "not as expected"}`
)
Variables ¶
This section is empty.
Functions ¶
func NewRateLimitInjecter ¶
func NewRateLimitInjecter(base http.RoundTripper, options *SecondaryRateLimitInjecterOptions) (http.RoundTripper, error)
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
type SecondaryRateLimitInjecterOptions ¶
type SecondaryRateLimitInjecterOptions struct {
Every time.Duration
Sleep time.Duration
UseXRateLimit bool
UsePrimaryRateLimit bool
InvalidBody bool
}
func (*SecondaryRateLimitInjecterOptions) IsNoop ¶
func (r *SecondaryRateLimitInjecterOptions) IsNoop() bool
func (*SecondaryRateLimitInjecterOptions) Validate ¶
func (r *SecondaryRateLimitInjecterOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.