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

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

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

Go to the source code of this file.

Functions

template<typename Dummy = void>
components::DynamicConfigUpdatesSinkBasedynamic_config::FindUpdatesSink (const components::ComponentConfig &config, const components::ComponentContext &context)
 Returns component to which incoming dynamic config updates should be forwarded.
 

Detailed Description

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

Definition in file find.hpp.

Function Documentation

◆ FindUpdatesSink()

template<typename Dummy = void>
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.

Definition at line 44 of file find.hpp.