Skip to main content

subscriber_slot

Function subscriber_slot 

Source
pub(crate) fn subscriber_slot(
    state: &AppState,
    headers: &HeaderMap,
    peer: Option<IpAddr>,
    route: &str,
) -> Option<SubscriberSlot>
Expand description

The slot a never-ending stream holds for as long as it is open, or None when this deployment is already holding as many as it will.

Keyed on the caller the per-address rate limiters are keyed on, so one caller cannot spend the whole total by itself; see crate::subscribers::SubscriberLimit.