61 static constexpr std::string_view
kName =
"dynamic-config";
63 class NoblockSubscriber;
65 DynamicConfig(
const ComponentConfig&,
const ComponentContext&);
66 ~DynamicConfig()
override;
80 void OnLoadingCancelled()
override;
82 void SetConfig(std::string_view updater, dynamic_config::DocsMap&& value)
override;
84 void SetConfig(std::string_view updater,
const dynamic_config::DocsMap& value)
override;
86 void NotifyLoadingFailed(std::string_view updater, std::string_view error)
override;
89 std::unique_ptr<Impl> impl_;
94class DynamicConfig::NoblockSubscriber
final {
96 explicit NoblockSubscriber(DynamicConfig& config_component)
noexcept;
98 NoblockSubscriber(NoblockSubscriber&&) =
delete;
99 NoblockSubscriber& operator=(NoblockSubscriber&&) =
delete;
101 concurrent::AsyncEventSource<
const dynamic_config::Snapshot&>& GetEventSource()
noexcept;
103 concurrent::AsyncEventSource<
const dynamic_config::Diff&>& GetDiffSource()
noexcept;
106 DynamicConfig& config_component_;