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/headers_propagator/component.hpp
4
/// @brief @copybrief
5
/// ugrpc::server::middlewares::headers_propagator::Component
6
7
#
include
<
userver
/
ugrpc
/
server
/
middlewares
/
base
.
hpp
>
8
9
USERVER_NAMESPACE_BEGIN
10
11
/// Server headers_propagator middleware
12
namespace
ugrpc::
server
::middlewares::
headers_propagator
{
13
14
// clang-format off
15
16
/// @ingroup userver_components userver_base_classes
17
///
18
/// @brief Component for gRPC server headers_propagator
19
///
20
/// ## Static options:
21
/// Name | Description | Default value
22
/// ---- | ----------- | -------------
23
/// headers | array of metadata fields (headers) to propagate | empty
24
25
// clang-format on
26
27
class
Component
final
:
public
MiddlewareComponentBase
{
28
public
:
29
/// @ingroup userver_component_names
30
/// @brief The default name of
31
/// ugrpc::server::middlewares::headers_propagator::Component
32
static
constexpr
std
::
string_view
kName
=
"grpc-server-headers-propagator"
;
33
34
Component(
const
components
::ComponentConfig& config,
const
components
::ComponentContext& context);
35
36
std::shared_ptr<
MiddlewareBase
>
GetMiddleware
()
override
;
37
38
static
yaml_config
::Schema GetStaticConfigSchema();
39
40
private
:
41
const
std::vector<std::string> headers_;
42
};
43
44
}
// namespace ugrpc::server::middlewares::headers_propagator
45
46
USERVER_NAMESPACE_END
userver
ugrpc
server
middlewares
headers_propagator
component.hpp
Generated on Tue Nov 19 2024 11:27:25 for userver by
Doxygen
1.10.0