Kurlyk
Loading...
Searching...
No Matches
kurlyk::HttpRateLimiter::LimitData Struct Reference

Immutable limit parameters plus per-key mutable state. More...

Public Member Functions

 LimitData ()
 LimitData (long request_limit, long period, bool is_sequential, bool is_removed, const std::unordered_map< std::string, KeyState > &key_states)

Public Attributes

long requests_per_period = 0
long period_ms = 0
bool sequential = false
 When `true`, blocks other requests until the current one finishes.
bool removed = false
 `true` when the manager-owned handle has been released; physical erase is deferred until all keys are empty.
std::unordered_map< std::string, KeyStatekeys
 Mutable state per partition key.

Detailed Description

Immutable limit parameters plus per-key mutable state.

Definition at line 388 of file HttpRateLimiter.hpp.

Constructor & Destructor Documentation

◆ LimitData() [1/2]

kurlyk::HttpRateLimiter::LimitData::LimitData ( )
inline

Definition at line 395 of file HttpRateLimiter.hpp.

◆ LimitData() [2/2]

kurlyk::HttpRateLimiter::LimitData::LimitData ( long request_limit,
long period,
bool is_sequential,
bool is_removed,
const std::unordered_map< std::string, KeyState > & key_states )
inline

Definition at line 397 of file HttpRateLimiter.hpp.

Member Data Documentation

◆ keys

std::unordered_map<std::string, KeyState> kurlyk::HttpRateLimiter::LimitData::keys

Mutable state per partition key.

Definition at line 393 of file HttpRateLimiter.hpp.

◆ period_ms

long kurlyk::HttpRateLimiter::LimitData::period_ms = 0

Definition at line 390 of file HttpRateLimiter.hpp.

◆ removed

bool kurlyk::HttpRateLimiter::LimitData::removed = false

`true` when the manager-owned handle has been released; physical erase is deferred until all keys are empty.

Definition at line 392 of file HttpRateLimiter.hpp.

◆ requests_per_period

long kurlyk::HttpRateLimiter::LimitData::requests_per_period = 0

Definition at line 389 of file HttpRateLimiter.hpp.

◆ sequential

bool kurlyk::HttpRateLimiter::LimitData::sequential = false

When `true`, blocks other requests until the current one finishes.

Definition at line 391 of file HttpRateLimiter.hpp.


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