Documentation ¶
Overview ¶
Package ratelimit provides tools to work with rate limits imposed by Sentry's data ingestion pipeline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category string
Category classifies supported payload types that can be ingested by Sentry and, therefore, rate limited.
type Deadline ¶
A Deadline is a time instant when a rate limit expires.
type Map ¶
Map maps categories to rate limit deadlines.
A rate limit is in effect for a given category if either the category's deadline or the deadline for the special CategoryAll has not yet expired.
Use IsRateLimited to check whether a category is rate-limited.
func FromResponse ¶
FromResponse returns a rate limit map from an HTTP response.
func (Map) Deadline ¶
Deadline returns the deadline when the rate limit for the given category or the special CategoryAll expire, whichever is furthest into the future.
func (Map) IsRateLimited ¶
IsRateLimited returns true if the category is currently rate limited.