userver: userver/dynamic_config/updates_sink/find.hpp Source File
Loading...
Searching...
No Matches
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.
29FindUpdatesSink(const components::ComponentConfig& config, const components::ComponentContext& context);
30
31} // namespace dynamic_config
32
33USERVER_NAMESPACE_END