userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
common_component.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/ugrpc/client/common_component.hpp
4
/// @brief @copybrief ugrpc::client::CommonComponent
5
6
#
include
<
optional
>
7
8
#
include
<
userver
/
components
/
component_base
.
hpp
>
9
#
include
<
userver
/
engine
/
task
/
task_processor_fwd
.
hpp
>
10
11
#
include
<
userver
/
ugrpc
/
client
/
impl
/
completion_queue_pool
.
hpp
>
12
#
include
<
userver
/
ugrpc
/
client
/
proxy_settings
.
hpp
>
13
#
include
<
userver
/
ugrpc
/
client
/
retry_limiter
.
hpp
>
14
#
include
<
userver
/
ugrpc
/
impl
/
completion_queue_pool_base
.
hpp
>
15
#
include
<
userver
/
ugrpc
/
impl
/
statistics_storage
.
hpp
>
16
17
USERVER_NAMESPACE_BEGIN
18
19
namespace
ugrpc::client {
20
21
/// @ingroup userver_components
22
///
23
/// @brief Contains common machinery that's required for all ugrpc clients
24
///
25
/// ## Static options of ugrpc::client::CommonComponent :
26
/// @include{doc} scripts/docs/en/components_schema/grpc/src/ugrpc/client/common_component.md
27
///
28
/// Options inherited from @ref components::ComponentBase :
29
/// @include{doc} scripts/docs/en/components_schema/core/src/components/impl/component_base.md
30
///
31
/// The component name for static config is `"grpc-client-common"`.
32
///
33
/// @see ugrpc::client::ClientFactoryComponent
34
class
CommonComponent
final
:
public
components
::
ComponentBase
{
35
public
:
36
/// @ingroup userver_component_names
37
/// @brief The default name of @ref ugrpc::client::CommonComponent
38
static
constexpr
std::string_view
kName
=
"grpc-client-common"
;
39
40
CommonComponent(
const
components
::ComponentConfig& config,
const
components
::ComponentContext& context);
41
~CommonComponent()
override
;
42
43
static
yaml_config::Schema GetStaticConfigSchema();
44
45
private
:
46
friend
class
ClientFactoryComponent;
47
48
engine::TaskProcessor& blocking_task_processor_;
49
std::optional<impl::CompletionQueuePool> client_completion_queues_;
50
ugrpc::impl::CompletionQueuePoolBase& completion_queues_;
51
ugrpc::impl::StatisticsStorage client_statistics_storage_;
52
ProxySettings
proxy_settings_;
53
RetryLimiterFactory
* retry_limiter_factory_;
54
};
55
56
}
// namespace ugrpc::client
57
58
template
<>
59
inline
constexpr
bool
components
::kHasValidate<ugrpc::client::CommonComponent> =
true
;
60
61
USERVER_NAMESPACE_END
userver
ugrpc
client
common_component.hpp
Generated on
for userver by
Doxygen
1.17.0