userver: userver/dynamic_config/updates_sink/find.hpp Source File
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
find.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/dynamic_config/updates_sink/find.hpp
4/// @brief Function for retrieving dynamic config updates sink specified in the
5/// static config.
6
7#include <type_traits>
8
9#include <userver/components/component_fwd.hpp>
10#include <userver/dynamic_config/fwd.hpp>
11
12USERVER_NAMESPACE_BEGIN
13
14namespace dynamic_config {
15
16/// @brief Returns component to which incoming dynamic config updates should be
17/// forwarded.
18///
19/// Component to be used as an updates sink is determined by the `updates-sink`
20/// static config field. If this field is not set, then
21/// components::DynamicConfig is used as a default sink.
22///
23/// @warning Can only be called from other component's constructor in a task
24/// where that constructor was called. May block and asynchronously wait for the
25/// creation of the requested component.
26///
27/// @note It is illegal to use the same updates sink from several components.
29 const components::ComponentConfig& config,
30 const components::ComponentContext& context);
31
32} // namespace dynamic_config
33
34USERVER_NAMESPACE_END