ratelimit

package
v0.0.0-...-902489a Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetClock

func SetClock(c clock.Clock)

Set the clock to something else, say the mock clock, for tests.

func WaitIfRateLimited

func WaitIfRateLimited(err error) bool

WaitIfRateLimited will return true if the error was a rate limit. If the error was a rate limit, it will also block until the rate limit is cleared. If the error was not a rate limit, then this will return false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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