diff options
Diffstat (limited to 'src/mongo/client/mongo_uri.h')
-rw-r--r-- | src/mongo/client/mongo_uri.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/client/mongo_uri.h b/src/mongo/client/mongo_uri.h index 4a7ca89126a..0118073f495 100644 --- a/src/mongo/client/mongo_uri.h +++ b/src/mongo/client/mongo_uri.h @@ -246,6 +246,15 @@ public: return _sslMode; } + bool isHelloOk() const { + return _helloOk.get_value_or(false); + } + + void setHelloOk(bool helloOk) { + invariant(!_helloOk.has_value()); + _helloOk.emplace(helloOk); + } + // If you are trying to clone a URI (including its options/auth information) for a single // server (say a member of a replica-set), you can pass in its HostAndPort information to // get a new URI with the same info, except type() will be kStandalone and getServers() will @@ -283,6 +292,7 @@ private: const std::string& database, boost::optional<bool> retryWrites, transport::ConnectSSLMode sslMode, + boost::optional<bool> helloOk, OptionsMap options) : _connectString(std::move(connectString)), _user(user), @@ -290,6 +300,7 @@ private: _database(database), _retryWrites(std::move(retryWrites)), _sslMode(sslMode), + _helloOk(helloOk), _options(std::move(options)) {} static MongoURI parseImpl(StringData url); @@ -300,6 +311,7 @@ private: std::string _database; boost::optional<bool> _retryWrites; transport::ConnectSSLMode _sslMode = transport::kGlobalSSLMode; + boost::optional<bool> _helloOk; OptionsMap _options; }; |