Skip to main content

relay_quotas/
lib.rs

1//! Quotas and rate limiting for Relay.
2
3#![warn(missing_docs)]
4#![doc(
5    html_logo_url = "https://raw.githubusercontent.com/getsentry/relay/master/artwork/relay-icon.png",
6    html_favicon_url = "https://raw.githubusercontent.com/getsentry/relay/master/artwork/relay-icon.png"
7)]
8#![allow(clippy::derive_partial_eq_without_eq)]
9
10/// The default timeout to apply when a scope is fully rejected. This
11/// typically happens for disabled keys, projects, or organizations.
12const REJECT_ALL_SECS: u64 = 60;
13
14/// The string key for a rate-limitable item with no dimensions.
15#[cfg(feature = "redis")]
16const EMPTY_DIMENSIONS: &str = "_";
17
18mod quota;
19mod rate_limit;
20
21pub use self::quota::*;
22pub use self::rate_limit::*;
23
24#[cfg(feature = "redis")]
25mod cache;
26#[cfg(feature = "redis")]
27mod redis;
28#[cfg(feature = "redis")]
29pub use self::redis::*;
30#[cfg(feature = "redis")]
31mod statsd;