userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
reflection_service_component.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/grpc-reflection/reflection_service_component.hpp
4
/// @brief @copybrief grpc_reflection::ReflectionServiceComponent
5
6
#
include
<
string_view
>
7
8
#
include
<
userver
/
components
/
component_config
.
hpp
>
9
#
include
<
userver
/
components
/
component_context
.
hpp
>
10
#
include
<
userver
/
ugrpc
/
server
/
server
.
hpp
>
11
#
include
<
userver
/
ugrpc
/
server
/
service_component_base
.
hpp
>
12
13
USERVER_NAMESPACE_BEGIN
14
15
/// @brief Top namespace for grpc-reflection library
16
///
17
/// For more information see @ref scripts/docs/en/userver/libraries/grpc-reflection.md.
18
namespace
grpc_reflection
{
19
20
class
ProtoServerReflection;
21
22
class
ReflectionServiceComponent
final
:
public
ugrpc::server::
ServiceComponentBase
{
23
public
:
24
static
constexpr
std::string_view kName =
"grpc-reflection-service"
;
25
26
ReflectionServiceComponent(
const
components
::ComponentConfig& config,
const
components
::ComponentContext& context);
27
28
~ReflectionServiceComponent()
override
;
29
30
private
:
31
void
OnAllComponentsLoaded()
override
;
32
33
components
::
ComponentHealth
GetComponentHealth()
const
override
;
34
35
void
AddService(std::string_view service_name);
36
37
std::unique_ptr<
grpc_reflection
::ProtoServerReflection> service_;
38
ugrpc::server::Server& ugrpc_server_;
39
std::atomic<
bool
> ready_{
false
};
40
};
41
42
}
// namespace grpc_reflection
43
44
USERVER_NAMESPACE_END
userver
grpc-reflection
reflection_service_component.hpp
Generated on
for userver by
Doxygen
1.17.0