userver
C++ Async Framework
Loading...
Searching...
No Matches
restart.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/server/handlers/restart.hpp
4
/// @brief @copybrief server::handlers::Restart
5
6
#
include
<
atomic
>
7
8
#
include
<
userver
/
server
/
handlers
/
http_handler_base
.
hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
server::
handlers
{
13
14
/// @ingroup userver_components userver_http_handlers
15
///
16
/// @brief Handler that stops the service. It is expected that an external system
17
/// (e.g. systemd or supervisord) restarts the service afterwards.
18
///
19
/// The handler uses monitor port.
20
///
21
/// The component has no service configuration except the
22
/// @ref userver_http_handlers "common handler options".
23
class
Restart
final
:
public
HttpHandlerBase
{
24
public
:
25
Restart(
const
components
::ComponentConfig&,
const
components
::ComponentContext&);
26
27
/// @ingroup userver_component_names
28
/// @brief The default name of server::handlers::Restart
29
static
constexpr
std::string_view
kName
=
"handler-restart"
;
30
31
std::string
HandleRequestThrow
(
const
http
::HttpRequest&,
request
::RequestContext&)
const
override
;
32
33
components
::
ComponentHealth
GetComponentHealth
()
const
override
;
34
35
private
:
36
mutable
std::atomic<
components
::
ComponentHealth
> health_;
37
};
38
39
}
// namespace server::handlers
40
41
USERVER_NAMESPACE_END
userver
server
handlers
restart.hpp
Generated on Thu May 21 2026 16:19:28 for userver by
Doxygen
1.13.2