userver
C++ Async Framework
Loading...
Searching...
No Matches
component.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/os_signals/component.hpp
4
/// @brief @copybrief os_signals::ProcessorComponent
5
6
#
include
<
csignal
>
7
8
#
include
<
userver
/
components
/
component_fwd
.
hpp
>
9
#
include
<
userver
/
components
/
raw_component_base
.
hpp
>
10
#
include
<
userver
/
os_signals
/
processor
.
hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
/// @brief Components and functions to work with OS signals
15
namespace
os_signals
{
16
17
/// @ingroup userver_components
18
///
19
/// @brief A component for os_signals::Processor
20
///
21
/// Declaration in static config file may be skipped.
22
///
23
/// @see @ref scripts/docs/en/userver/os_signals.md
24
class
ProcessorComponent
final
:
public
components
::
RawComponentBase
{
25
public
:
26
/// @ingroup userver_component_names
27
/// @brief The default name of os_signals::ProcessorComponent
28
static
constexpr
std
::
string_view
kName
=
"os-signal-processor"
;
29
30
ProcessorComponent(
const
components
::ComponentConfig& config,
const
components
::ComponentContext& context);
31
32
os_signals
::Processor& Get();
33
34
private
:
35
os_signals
::Processor manager_;
36
};
37
38
}
// namespace os_signals
39
40
template
<>
41
inline
constexpr
auto
components
::kConfigFileMode<os_signals::ProcessorComponent> =
ConfigFileMode
::
kNotRequired
;
42
43
USERVER_NAMESPACE_END
userver
os_signals
component.hpp
Generated on Tue Nov 19 2024 11:27:12 for userver by
Doxygen
1.10.0