⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
userver
C++ Async Framework v2.0
Documentation
API Groups
Namespaces
Reference
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
y
Variables
k
n
r
u
w
Typedefs
c
d
h
m
n
o
p
s
t
u
v
Enumerations
a
b
c
d
f
h
i
l
o
p
r
s
t
u
v
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Symbols
File List
File Members
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
▼
userver
Documentation
►
API Groups
►
Namespaces
▼
Reference
►
Namespace Members
►
Class List
Class Index
►
Class Hierarchy
►
Class Members
▼
File List
►
en
►
testsuite
►
userver
▼
userver
►
alerts
►
baggage
►
cache
►
clients
►
components
►
concurrent
▼
congestion_control
►
controllers
component.hpp
►
config.hpp
controller.hpp
limiter.hpp
sensor.hpp
►
dist_lock
►
drivers
►
dump
►
dynamic_config
►
engine
►
error_injection
►
fs
►
logging
►
moodycamel
►
net
►
os_signals
►
rcu
►
server
►
storages
►
testsuite
►
tracing
►
utils
►
userver
►
userver
►
userver
►
userver
►
userver
►
userver
►
userver
►
userver
►
userver
►
userver
►
File Members
►
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
limiter.hpp
1
#
pragma
once
2
3
#
include
<
optional
>
4
#
include
<
string
>
5
6
USERVER_NAMESPACE_BEGIN
7
8
namespace
congestion_control
{
9
10
struct
Limit
{
11
std::optional<size_t> load_limit;
12
size_t current_load{0};
13
14
std::string ToLogString() {
15
return
"limit="
+
16
(load_limit ? std::to_string(*load_limit) : std::string(
"(none)"
));
17
}
18
};
19
20
class
Limiter
{
21
public
:
22
virtual
void
SetLimit(
const
Limit
& new_limit) = 0;
23
24
protected
:
25
~Limiter() =
default
;
26
};
27
28
}
// namespace congestion_control
29
30
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
congestion_control
limiter.hpp
Generated on Wed May 15 2024 22:17:42 for userver by
Doxygen
1.10.0