userver: storages::mongo::MultiMongo::PoolSet Class Reference
Loading...
Searching...
No Matches
storages::mongo::MultiMongo::PoolSet Class Reference

#include <userver/storages/mongo/multi_mongo.hpp>

Detailed Description

Database set builder.

Definition at line 24 of file multi_mongo.hpp.

Public Member Functions

 PoolSet (MultiMongo &)
 
 PoolSet (const PoolSet &)
 
 PoolSet (PoolSet &&) noexcept
 
PoolSetoperator= (const PoolSet &)
 
PoolSetoperator= (PoolSet &&) noexcept
 
void AddExistingPools ()
 Adds all currently enabled databases to the set.
 
void AddPool (std::string dbalias)
 Adds a database to the set by its name.
 
bool RemovePool (const std::string &dbalias)
 Removes the database with the specified name from the set.
 
void Activate ()
 Replaces the working database set.
 

Member Function Documentation

◆ AddPool()

void storages::mongo::MultiMongo::PoolSet::AddPool ( std::string dbalias)

Adds a database to the set by its name.

Parameters
dbaliasname of the database in secdist config

◆ RemovePool()

bool storages::mongo::MultiMongo::PoolSet::RemovePool ( const std::string & dbalias)

Removes the database with the specified name from the set.

Parameters
dbaliasname of the database passed to AddPool
Returns
whether the database was in the set

The documentation for this class was generated from the following file: