8#include <unordered_map>
10#include <userver/components/component_base.hpp>
11#include <userver/dynamic_config/source.hpp>
12#include <userver/formats/json.hpp>
13#include <userver/utils/statistics/fwd.hpp>
14#include <userver/utils/statistics/storage.hpp>
16#include <userver/ydb/fwd.hpp>
22USERVER_NAMESPACE_BEGIN
74 std::shared_ptr<TableClient>
GetTableClient(
const std::string& dbname)
const;
78 std::shared_ptr<TopicClient>
GetTopicClient(
const std::string& dbname)
const;
101 std::shared_ptr<impl::Driver> driver;
102 std::shared_ptr<TableClient> table_client;
103 std::shared_ptr<TopicClient> topic_client;
104 std::shared_ptr<CoordinationClient> coordination_client;
107 void OnConfigUpdate(
const dynamic_config::Snapshot& cfg);
108 void WriteStatistics(
utils::statistics::Writer& writer)
const;
109 const Database& FindDatabase(
const std::string& dbname)
const;
111 std::unordered_map<std::string, Database> databases_;
113 dynamic_config::Source config_;
116 concurrent::AsyncEventSubscriberScope config_subscription_;
117 utils::statistics::Entry statistic_holder_;
123inline constexpr bool components::kHasValidate<ydb::YdbComponent> =
true;