userver: userver/dynamic_config/updates_sink/find.hpp File Reference
Loading...
Searching...
No Matches
find.hpp File Reference

Detailed Description

Function for retrieving dynamic config updates sink specified in the static config.

Definition in file find.hpp.

Go to the source code of this file.

#include <type_traits>
#include <userver/components/component_fwd.hpp>
#include <userver/dynamic_config/fwd.hpp>
+ Include dependency graph for find.hpp:

Functions

components::DynamicConfigUpdatesSinkBasedynamic_config::FindUpdatesSink (const components::ComponentConfig &config, const components::ComponentContext &context)
 Returns component to which incoming dynamic config updates should be forwarded.
 

Function Documentation

◆ FindUpdatesSink()

components::DynamicConfigUpdatesSinkBase & dynamic_config::FindUpdatesSink ( const components::ComponentConfig & config,
const components::ComponentContext & context )

Returns component to which incoming dynamic config updates should be forwarded.

Component to be used as an updates sink is determined by the updates-sink static config field. If this field is not set, then components::DynamicConfig is used as a default sink.

Warning
Can only be called from other component's constructor in a task where that constructor was called. May block and asynchronously wait for the creation of the requested component.
Note
It is illegal to use the same updates sink from several components.