#include <userver/storages/mongo/pool_config.hpp>
MongoDB connection pool configuration.
Definition at line 24 of file pool_config.hpp.
 Collaboration diagram for storages::mongo::PoolConfig:Public Types | |
| enum class | DriverImpl { kMongoCDriver } | 
Public Member Functions | |
| void | Validate (const std::string &pool_id) const | 
Public Attributes | |
| std::chrono::milliseconds | conn_timeout = kDefaultConnTimeout | 
| Connection (I/O) timeout.   | |
| std::chrono::milliseconds | so_timeout = kDefaultSoTimeout | 
| Socket (I/O) timeout.   | |
| std::chrono::milliseconds | queue_timeout = kDefaultQueueTimeout | 
| Connection queue wait time.   | |
| size_t | initial_size = kDefaultInitialSize | 
| Initial connection count.   | |
| size_t | max_size = kDefaultMaxSize | 
| Total connections limit.   | |
| size_t | idle_limit = kDefaultIdleLimit | 
| Idle connections limit.   | |
| size_t | connecting_limit = kDefaultConnectingLimit | 
| Establishing connections limit.   | |
| std::optional< std::chrono::milliseconds > | local_threshold {} | 
| Instance selection latency window override.   | |
| std::chrono::milliseconds | maintenance_period = kDefaultMaintenancePeriod | 
| Pool maintenance period.   | |
| std::string | app_name = kDefaultAppName | 
| Application name (sent to server)   | |
| std::optional< std::chrono::seconds > | max_replication_lag | 
| Default max replication lag for the pool.   | |
| DriverImpl | driver_impl = DriverImpl::kMongoCDriver | 
| Driver implementation to use.   | |
| StatsVerbosity | stats_verbosity = StatsVerbosity::kTerse | 
| Whether to write detailed stats.   | |
| congestion_control::v2::LinearController::StaticConfig | cc_config | 
| Congestion control config.   | |
Static Public Attributes | |
| static constexpr auto | kDefaultConnTimeout = std::chrono::seconds{2} | 
| Default connection timeout.   | |
| static constexpr auto | kDefaultSoTimeout = std::chrono::seconds{10} | 
| Default socket timeout.   | |
| static constexpr auto | kDefaultQueueTimeout = std::chrono::seconds{1} | 
| Default connection queue timeout.   | |
| static constexpr size_t | kDefaultInitialSize = 16 | 
| Default initial connection count.   | |
| static constexpr size_t | kDefaultMaxSize = 128 | 
| Default total connections limit.   | |
| static constexpr size_t | kDefaultIdleLimit = 64 | 
| Default idle connections limit.   | |
| static constexpr size_t | kDefaultConnectingLimit = 8 | 
| Default establishing connections limit.   | |
| static constexpr auto | kDefaultMaintenancePeriod = std::chrono::seconds{15} | 
| Default pool maintenance period.   | |
| static constexpr char | kDefaultAppName [] = "userver" | 
| Default application name.   | |
      
  | 
  strong | 
Definition at line 25 of file pool_config.hpp.
| void storages::mongo::PoolConfig::Validate | ( | const std::string & | pool_id | ) | const | 
| InvalidConfigException | if the config is invalid | 
| std::string storages::mongo::PoolConfig::app_name = kDefaultAppName | 
Application name (sent to server)
Definition at line 71 of file pool_config.hpp.
| congestion_control::v2::LinearController::StaticConfig storages::mongo::PoolConfig::cc_config | 
Congestion control config.
Definition at line 82 of file pool_config.hpp.
| std::chrono::milliseconds storages::mongo::PoolConfig::conn_timeout = kDefaultConnTimeout | 
Connection (I/O) timeout.
Definition at line 52 of file pool_config.hpp.
| size_t storages::mongo::PoolConfig::connecting_limit = kDefaultConnectingLimit | 
Establishing connections limit.
Definition at line 64 of file pool_config.hpp.
| DriverImpl storages::mongo::PoolConfig::driver_impl = DriverImpl::kMongoCDriver | 
Driver implementation to use.
Definition at line 76 of file pool_config.hpp.
| size_t storages::mongo::PoolConfig::idle_limit = kDefaultIdleLimit | 
Idle connections limit.
Definition at line 62 of file pool_config.hpp.
| size_t storages::mongo::PoolConfig::initial_size = kDefaultInitialSize | 
Initial connection count.
Definition at line 58 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default application name.
Definition at line 46 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default establishing connections limit.
Definition at line 42 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default connection timeout.
Definition at line 30 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default idle connections limit.
Definition at line 40 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default initial connection count.
Definition at line 36 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default pool maintenance period.
Definition at line 44 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default total connections limit.
Definition at line 38 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default connection queue timeout.
Definition at line 34 of file pool_config.hpp.
      
  | 
  staticconstexpr | 
Default socket timeout.
Definition at line 32 of file pool_config.hpp.
| std::optional<std::chrono::milliseconds> storages::mongo::PoolConfig::local_threshold {} | 
Instance selection latency window override.
Definition at line 66 of file pool_config.hpp.
| std::chrono::milliseconds storages::mongo::PoolConfig::maintenance_period = kDefaultMaintenancePeriod | 
Pool maintenance period.
Definition at line 68 of file pool_config.hpp.
| std::optional<std::chrono::seconds> storages::mongo::PoolConfig::max_replication_lag | 
Default max replication lag for the pool.
Definition at line 73 of file pool_config.hpp.
| size_t storages::mongo::PoolConfig::max_size = kDefaultMaxSize | 
Total connections limit.
Definition at line 60 of file pool_config.hpp.
| std::chrono::milliseconds storages::mongo::PoolConfig::queue_timeout = kDefaultQueueTimeout | 
Connection queue wait time.
Definition at line 56 of file pool_config.hpp.
| std::chrono::milliseconds storages::mongo::PoolConfig::so_timeout = kDefaultSoTimeout | 
Socket (I/O) timeout.
Definition at line 54 of file pool_config.hpp.
| StatsVerbosity storages::mongo::PoolConfig::stats_verbosity = StatsVerbosity::kTerse | 
Whether to write detailed stats.
Definition at line 79 of file pool_config.hpp.