5#include <unordered_map>
7#include <userver/dynamic_config/source.hpp>
8#include <userver/rcu/rcu.hpp>
9#include <userver/storages/secdist/fwd.hpp>
10#include <userver/utils/statistics/fwd.hpp>
12#include <userver/storages/mongo/pool.hpp>
13#include <userver/storages/mongo/pool_config.hpp>
15USERVER_NAMESPACE_BEGIN
38 void AddPool(std::string dbalias);
50 std::shared_ptr<PoolMap> pool_map_ptr_;
55 storages::mongo::PoolConfig pool_config,
56 clients::dns::Resolver* dns_resolver,
57 dynamic_config::Source config_source);
69 void AddPool(std::string dbalias);
82 friend void DumpMetric(utils::statistics::Writer& writer,
85 const std::string& GetName()
const {
return name_; }
88 void OnConfigUpdate(
const dynamic_config::Snapshot& config);
90 storages::mongo::PoolPtr FindPool(
const std::string& dbalias)
const;
92 const std::string name_;
94 dynamic_config::Source config_source_;
95 const storages::mongo::PoolConfig pool_config_;
96 clients::dns::Resolver* dns_resolver_;
97 rcu::Variable<PoolMap> pool_map_;
99 concurrent::AsyncEventSubscriberScope config_subscriber_;