userver
C++ Async Framework
Loading...
Searching...
No Matches
component.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/ugrpc/server/middlewares/congestion_control/component.hpp
4
/// @brief @copybrief
5
/// ugrpc::server::middlewares::congestion_control::Component
6
7
#
include
<
userver
/
ugrpc
/
server
/
middlewares
/
base
.
hpp
>
8
9
USERVER_NAMESPACE_BEGIN
10
11
/// Server congestion_control middleware
12
namespace
ugrpc::
server
::middlewares::
congestion_control
{
13
14
class
Middleware;
15
16
// clang-format off
17
18
/// @ingroup userver_components userver_base_classes
19
///
20
/// @brief Component for gRPC server logging
21
///
22
/// The component does **not** have any options for service config.
23
///
24
/// ## Static configuration example:
25
///
26
/// @snippet grpc/functional_tests/basic_chaos/static_config.yaml Sample grpc server congestion control middleware component config
27
28
// clang-format on
29
30
class
Component
final
:
public
MiddlewareComponentBase
{
31
public
:
32
/// @ingroup userver_component_names
33
/// @brief The default name of
34
/// ugrpc::server::middlewares::congestion_control::Component
35
static
constexpr
std
::
string_view
kName
=
"grpc-server-congestion-control"
;
36
37
Component(
const
components
::ComponentConfig& config,
const
components
::ComponentContext& context);
38
39
std::shared_ptr<
MiddlewareBase
>
GetMiddleware
()
override
;
40
41
static
yaml_config
::Schema GetStaticConfigSchema();
42
43
private
:
44
std::shared_ptr<Middleware> middleware_;
45
};
46
47
}
// namespace ugrpc::server::middlewares::congestion_control
48
49
USERVER_NAMESPACE_END
userver
ugrpc
server
middlewares
congestion_control
component.hpp
Generated on Tue Nov 19 2024 11:27:21 for userver by
Doxygen
1.10.0