cloudiful-rate-limiter 0.1.0

Reusable async resource throttling with local and Valkey-backed backends.
Documentation
1
2
3
4
5
6
7
8
9
10
#[cfg(feature = "valkey")]
use redis::Script;

#[cfg(feature = "valkey")]
pub(crate) const ACQUIRE_OR_PEEK: &str = include_str!("lua/acquire_or_peek.lua");

#[cfg(feature = "valkey")]
pub(crate) fn script(source: &'static str) -> Script {
    Script::new(source)
}