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_;
56 const storages::
secdist::Secdist& secdist,
57 storages::mongo::PoolConfig pool_config,
59 dynamic_config::Source config_source
66 storages::mongo::PoolPtr
GetPool(
const std::string& dbalias)
const;
72 void AddPool(std::string dbalias);
87 const std::string& GetName()
const {
return name_; }
90 void OnConfigUpdate(
const dynamic_config::Snapshot& config);
92 storages::mongo::PoolPtr FindPool(
const std::string& dbalias)
const;
94 const std::string name_;
95 const storages::
secdist::Secdist& secdist_;
96 dynamic_config::Source config_source_;
97 const storages::mongo::PoolConfig pool_config_;
99 rcu::Variable<PoolMap> pool_map_;
101 concurrent::AsyncEventSubscriberScope config_subscriber_;