userver
C++ Async Framework
Toggle main menu visibility
Documentation
API Groups
Namespaces
Reference
Class List
Class Index
File List
Macros
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
limiter.hpp
1
#
pragma
once
2
3
#
include
<
optional
>
4
#
include
<
vector
>
5
6
#
include
<
userver
/
concurrent
/
variable
.
hpp
>
7
#
include
<
userver
/
congestion_control
/
limiter
.
hpp
>
8
#
include
<
userver
/
utils
/
not_null
.
hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
server::congestion_control {
13
14
class
Limitee
{
15
public
:
16
virtual
void
SetLimit(std::optional<size_t> new_limit) = 0;
17
};
14
class
Limitee
{
…
};
18
19
class
Limiter
final
:
public
USERVER_NAMESPACE::congestion_control::
Limiter
{
20
public
:
21
void
SetLimit(
const
USERVER_NAMESPACE::congestion_control::
Limit
& new_limit)
override
;
22
23
void
RegisterLimitee(
Limitee
& limitee);
24
25
private
:
26
concurrent
::Variable<std::vector<
utils
::
NotNull
<
Limitee
*>>, std::mutex> limitees_;
27
};
19
class
Limiter
final
:
public
USERVER_NAMESPACE::congestion_control::
Limiter
{
…
};
28
29
}
// namespace server::congestion_control
30
31
USERVER_NAMESPACE_END
userver
server
congestion_control
limiter.hpp
Generated on Wed Apr 30 2025 15:49:08 for userver by
Doxygen
1.13.2