1MONGOC_CLIENT_GET_SERVER_STATUS(3) libmongocMONGOC_CLIENT_GET_SERVER_STATUS(3)
2
3
4
6 mongoc_client_get_server_status - mongoc_client_get_server_status()
7
8 WARNING:
9 Deprecated since version 1.10.0: This function is deprecated and
10 should not be used in new code.
11
12 Run the serverStatus command directly with
13 mongoc_client_read_command_with_opts() instead.
14
15
17 bool
18 mongoc_client_get_server_status (mongoc_client_t *client,
19 mongoc_read_prefs_t *read_prefs,
20 bson_t *reply,
21 bson_error_t *error) BSON_GNUC_DEPRECATED;
22
23 Queries the server for the current server status. The result is stored
24 in reply.
25
26 reply is always initialized, even in the case of failure. Always call
27 bson_destroy() to release it.
28
30 • client: A mongoc_client_t.
31
32 • read_prefs: A mongoc_read_prefs_t.
33
34 • reply: A location for the result bson_t.
35
36 • error: An optional location for a bson_error_t or NULL.
37
39 Errors are propagated via the error parameter.
40
42 Returns true if successful. Returns false and sets error if there are
43 invalid arguments or a server or network error.
44
46 MongoDB, Inc
47
49 2017-present, MongoDB, Inc
50
51
52
53
541.24.3 Aug 17, 2023MONGOC_CLIENT_GET_SERVER_STATUS(3)