6#include <userver/concurrent/variable.hpp>
7#include <userver/congestion_control/limiter.hpp>
8#include <userver/utils/not_null.hpp>
10USERVER_NAMESPACE_BEGIN
12namespace server::congestion_control {
16 virtual void SetLimit(std::optional<size_t> new_limit) = 0;
19class Limiter
final :
public USERVER_NAMESPACE::congestion_control::
Limiter {
21 void SetLimit(
const USERVER_NAMESPACE::congestion_control::
Limit& new_limit)
override;
23 void RegisterLimitee(
Limitee& limitee);
26 concurrent::Variable<std::vector<utils::NotNull<Limitee*>>, std::mutex> limitees_;