Skip to main content

set_rate_limiter_tokens

Function set_rate_limiter_tokens 

Source
pub fn set_rate_limiter_tokens(session: &str, tokens: f64)
Expand description

Set the rate-limiter tokens-remaining gauge for a session.

Call after each rate-limit check to update the gauge with the current number of tokens remaining in that session’s bucket.

No-op if metrics have not been initialised.

§Panics

This function never panics.