#include <userver/storages/mongo/pool_config.hpp>
MongoDB connection pool configuration.
Definition at line 55 of file pool_config.hpp.
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. | |
PoolSettings | pool_settings {} |
settings for connections pool | |
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::milliseconds{100} |
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 auto | kDefaultMaintenancePeriod = std::chrono::seconds{15} |
Default pool maintenance period. | |
static constexpr char | kDefaultAppName [] = "userver" |
Default application name. | |
|
strong |
Definition at line 56 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 88 of file pool_config.hpp.
congestion_control::v2::LinearController::StaticConfig storages::mongo::PoolConfig::cc_config |
Congestion control config.
Definition at line 99 of file pool_config.hpp.
std::chrono::milliseconds storages::mongo::PoolConfig::conn_timeout = kDefaultConnTimeout |
Connection (I/O) timeout.
Definition at line 75 of file pool_config.hpp.
DriverImpl storages::mongo::PoolConfig::driver_impl = DriverImpl::kMongoCDriver |
Driver implementation to use.
Definition at line 93 of file pool_config.hpp.
|
staticconstexpr |
Default application name.
Definition at line 69 of file pool_config.hpp.
|
staticconstexpr |
Default connection timeout.
Definition at line 61 of file pool_config.hpp.
|
staticconstexpr |
Default pool maintenance period.
Definition at line 67 of file pool_config.hpp.
|
staticconstexpr |
Default connection queue timeout.
Definition at line 65 of file pool_config.hpp.
|
staticconstexpr |
Default socket timeout.
Definition at line 63 of file pool_config.hpp.
std::optional<std::chrono::milliseconds> storages::mongo::PoolConfig::local_threshold {} |
Instance selection latency window override.
Definition at line 83 of file pool_config.hpp.
std::chrono::milliseconds storages::mongo::PoolConfig::maintenance_period = kDefaultMaintenancePeriod |
Pool maintenance period.
Definition at line 85 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 90 of file pool_config.hpp.
PoolSettings storages::mongo::PoolConfig::pool_settings {} |
settings for connections pool
Definition at line 81 of file pool_config.hpp.
std::chrono::milliseconds storages::mongo::PoolConfig::queue_timeout = kDefaultQueueTimeout |
Connection queue wait time.
Definition at line 79 of file pool_config.hpp.
std::chrono::milliseconds storages::mongo::PoolConfig::so_timeout = kDefaultSoTimeout |
Socket (I/O) timeout.
Definition at line 77 of file pool_config.hpp.
StatsVerbosity storages::mongo::PoolConfig::stats_verbosity = StatsVerbosity::kTerse |
Whether to write detailed stats.
Definition at line 96 of file pool_config.hpp.