20#include "mongo/base/status.h"
21#include "mongo/client/export_macros.h"
22#include "mongo/client/options.h"
99 return status().isOK();
116 bool _terminateNeeded;
An RAII helper to simplify driver setup and teardown.
Definition init.h:69
void assertInitialized() const
Raises a UserAssertion exception if the GlobalInstance failed to initialize the library.
Status shutdown()
Immediately calls 'shutdown' on the driver and returns the resulting Status.
GlobalInstance(const Options &options=Options())
Invokes 'mongo::client::initialize" with the provided Options, or the default Options if none are pro...
bool initialized() const
Returns 'true' if initialization succeeded, 'false' otherwise.
Definition init.h:98
~GlobalInstance()
Invokes 'mongo::client::shutdown' if the GlobalInstance succeeded in initializing the library and if ...
const Status & status() const
Returns the Status generated by the internal call to 'client::initialize'.
Definition init.h:93
The Options structure is passed to mongo::client::initialize to configure various properties and conf...
Definition options.h:32
MONGO_CLIENT_API Status MONGO_CLIENT_FUNC shutdown()
Terminates the client driver.
MONGO_CLIENT_API Status MONGO_CLIENT_FUNC initialize(const Options &options=Options())
Initializes the client driver, possibly with custom options.
the main MongoDB namespace
Definition bulk_operation_builder.h:24
MONGO_CLIENT_API Status(MONGO_CLIENT_FUNC *saslClientAuthenticate)(DBClientWithCommands *client
Attempts to authenticate "client" using the SASL protocol.