Kurlyk
Loading...
Searching...
No Matches
kurlyk::RateLimitDelay< Duration > Struct Template Reference

Result type for time-until-allowed queries. More...

#include <HttpRateLimitDelay.hpp>

Public Attributes

Duration duration
 Delay until the limit allows a request. 0 means ready now.
bool sequential_blocked
 true if duration reflects Duration::max() because a sequential in-flight request is blocking.

Detailed Description

template<typename Duration = std::chrono::milliseconds>
struct kurlyk::RateLimitDelay< Duration >

Result type for time-until-allowed queries.

Carries both a numeric delay and a semantic flag that distinguishes time-based blocking (count/period limits) from sequential blocking (an in-flight request must finish before the next one may start).

When sequential_blocked == true, duration equals Duration::max(). Callers must wait for release_request() or an explicit notification instead of calling sleep_for(duration).

Definition at line 21 of file HttpRateLimitDelay.hpp.

Member Data Documentation

◆ duration

template<typename Duration = std::chrono::milliseconds>
Duration kurlyk::RateLimitDelay< Duration >::duration

Delay until the limit allows a request. 0 means ready now.

Definition at line 22 of file HttpRateLimitDelay.hpp.

◆ sequential_blocked

template<typename Duration = std::chrono::milliseconds>
bool kurlyk::RateLimitDelay< Duration >::sequential_blocked

true if duration reflects Duration::max() because a sequential in-flight request is blocking.

Callers must treat this as "wait for release_request(), not sleep_for()".

Definition at line 23 of file HttpRateLimitDelay.hpp.


The documentation for this struct was generated from the following file: