Crate relay_quotas

Source
Expand description

Quotas and rate limiting for Relay.

Structs§

CachedRateLimits
A thread-safe cache of rate limits with automatic expiration handling.
GlobalRateLimiter
A rate limiter for global rate limits.
ItemScoping
Data categorization and scoping information for a single item.
OwnedRedisQuota
Owned version of RedisQuota.
Quota
Configuration for a data ingestion quota.
RateLimit
An active rate limit that restricts data ingestion.
RateLimits
A collection of scoped rate limits.
RateLimitsIntoIter
An iterator that consumes a RateLimits collection.
RateLimitsIter
An iterator over rate limit references.
ReasonCode
A machine-readable reason code for rate limits.
RedisQuota
Reference to information required for tracking quotas in Redis.
RedisRateLimiter
A service that executes quotas and checks for rate limits in a shared cache.
RetryAfter
A monotonic expiration marker for rate limits.
Scoping
Data scoping information for rate limiting and quota enforcement.

Enums§

CategoryUnit
The unit in which a data category is measured.
DataCategory
Classifies the type of data that is being ingested.
InvalidRetryAfter
Error that occurs when parsing a RetryAfter from a string fails.
MetricNamespaceScoping
Describes the metric namespace scoping of an item.
QuotaScope
The scope at which a quota is applied.
RateLimitScope
The scope that a rate limit applies to.
RateLimitingError
An error returned by RedisRateLimiter.

Traits§

GlobalLimiter
A trait that exposes methods to check global rate limits.

Type Aliases§

DataCategories
An efficient container for data categories that avoids allocations.