Create a shared rate limiter and schedule its periodic window reset.
Declared in <logging.h>
static
std::shared_ptr<LogRateLimiter>
Create(
SchedulerFunction&& scheduler_func,
uint64_t max_bytes,
std::chrono::seconds reset_window);
A shared pointer to the newly created rate limiter.
| Name | Description |
|---|---|
| scheduler_func | Callable object used to schedule resetting the window. The first parameter is the function to be executed, and the second is the reset_window interval. |
| max_bytes | Maximum number of bytes that can be logged for each source location. |
| reset_window | Time window after which the stats are reset. |