userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
component_fwd.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/components/component_fwd.hpp
4
/// @brief Forward declarations for components::ComponentContext and
5
/// components::ComponentConfig; function components::GetCurrentComponentName() and components::GetFsTaskProcessor().
6
7
#
include
<
string_view
>
8
9
#
include
<
userver
/
engine
/
task
/
task_processor_fwd
.
hpp
>
10
#
include
<
userver
/
utils
/
resource_scopes_fwd
.
hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
components
{
15
16
template
<
typename
T>
17
struct
WithType
;
18
19
class
ComponentConfig;
20
21
class
ComponentContext;
22
23
/// @brief Equivalent to @ref components::ComponentContext::GetComponentName, but works with forward declaration of
24
/// the @ref components::ComponentContext.
25
std::string_view
GetCurrentComponentName
(
const
ComponentContext& context);
26
27
/// @brief Equivalent to @ref components::ComponentContext::Scopes, but works with forward declaration of
28
/// the @ref components::ComponentContext.
29
utils
::ResourceScopeStorage&
GetResourceScopes
(
const
ComponentContext& context);
30
31
/// @brief Returns the `config["fs-task-processor"]` if it is set; otherwise returns the default blocking
32
/// task processor that was set in components::ManagerControllerComponent.
33
engine::TaskProcessor&
GetFsTaskProcessor
(
const
ComponentConfig& config,
const
ComponentContext& context);
34
35
}
// namespace components
36
37
USERVER_NAMESPACE_END
userver
components
component_fwd.hpp
Generated on
for userver by
Doxygen
1.17.0