6#include <userver/components/component_base.hpp>
7#include <userver/storages/mongo/multi_mongo.hpp>
8#include <userver/storages/mongo/pool.hpp>
9#include <userver/storages/secdist/component.hpp>
10#include <userver/utils/statistics/entry.hpp>
12USERVER_NAMESPACE_BEGIN
85class Mongo :
public ComponentBase {
88 Mongo(
const ComponentConfig&,
const ComponentContext&);
96 static yaml_config::Schema GetStaticConfigSchema();
99 void OnSecdistUpdate(
const storages::secdist::SecdistConfig& config);
101 std::string dbalias_;
102 storages::mongo::PoolPtr pool_;
105 concurrent::AsyncEventSubscriberScope secdist_subscriber_;
106 utils::statistics::Entry statistics_holder_;
110inline constexpr bool kHasValidate<Mongo> =
true;
156 static constexpr std::string_view
kName =
"multi-mongo";
167 storages::mongo::PoolPtr
GetPool(
const std::string& dbalias)
const;
187 static yaml_config::Schema GetStaticConfigSchema();
193 utils::statistics::Entry statistics_holder_;
197inline constexpr bool kHasValidate<MultiMongo> =
true;