MongoDB C++ Driver
mongocxx-3.6.2
|
17 #include <bsoncxx/document/view.hpp>
18 #include <bsoncxx/stdx/string_view.hpp>
20 #include <mongocxx/config/prelude.hpp>
23 MONGOCXX_INLINE_NAMESPACE_BEGIN
44 std::uint32_t
id()
const;
59 bsoncxx::stdx::string_view
type()
const;
74 bsoncxx::stdx::string_view
host()
const;
81 std::uint16_t
port()
const;
88 MONGOCXX_INLINE_NAMESPACE_END
91 #include <mongocxx/config/postlude.hpp>
bsoncxx::stdx::string_view host() const
Returns the server host name.
Class representing what the driver knows about a MongoDB server.
Definition: server_description.hpp:30
Top level namespace for the MongoDB C++ driver.
Definition: bulk_write.hpp:24
std::uint32_t id() const
An opaque id, unique to this server for this mongocxx::client or mongocxx::pool.
std::uint16_t port() const
Returns the server port.
~server_description()
Destroys a server_description.
std::int64_t round_trip_time() const
The duration of the last isMaster call, indicating network latency.
bsoncxx::stdx::string_view type() const
The server type: "Unknown", "Standalone", "Mongos", "PossiblePrimary", "RSPrimary",...
bsoncxx::document::view is_master() const
The server's last response to the "isMaster" command, or an empty document if the driver has not yet ...
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33