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 storages::mongo::PoolPtr FindPool(
const std::string& dbalias)
const;
90 const std::string name_;
92 dynamic_config::Source config_source_;
93 const storages::mongo::PoolConfig pool_config_;
94 clients::dns::Resolver* dns_resolver_;
95 rcu::Variable<PoolMap> pool_map_;