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
17namespace storages::mongo {
38 void AddPool(std::string dbalias);
50 std::shared_ptr<PoolMap> pool_map_ptr_;
54 MultiMongo(std::string name,
const storages::
secdist::Secdist& secdist,
55 storages::mongo::PoolConfig pool_config,
56 clients::dns::Resolver* dns_resolver,
57 dynamic_config::Source config_source);
63 storages::mongo::PoolPtr
GetPool(
const std::string& dbalias)
const;
69 void AddPool(std::string dbalias);
85 const std::string& GetName()
const {
return name_; }
88 storages::mongo::PoolPtr FindPool(
const std::string& dbalias)
const;
90 const std::string name_;
91 const storages::
secdist::Secdist& secdist_;
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_;