current_usage

Function current_usage 

Source
pub fn current_usage(
    store: &StateStore,
    consumer_id: i64,
    quotas: &ConsumerQuotas,
    now_epoch_s: i64,
) -> Vec<BudgetUsage>
Expand description

Read the current-window usage of every configured budget for one consumer (no reservation, no increment — the query side of metering). A store that cannot answer yields an empty read; callers surface the gap their own way (the admin endpoint 500s, the gauge refresh skips).