Couchbase C Client  3.2.2
Asynchronous C Client for Couchbase

Detailed Description

Broadcast NOOP-like commands to each service in the cluster.


lcb_STATUS lcb_respping_status (const lcb_RESPPING *resp)
lcb_STATUS lcb_respping_cookie (const lcb_RESPPING *resp, void **cookie)
lcb_STATUS lcb_respping_value (const lcb_RESPPING *resp, const char **json, size_t *json_len)
lcb_STATUS lcb_respping_report_id (const lcb_RESPPING *resp, const char **report_id, size_t *report_id_len)
size_t lcb_respping_result_size (const lcb_RESPPING *resp)
lcb_PING_STATUS lcb_respping_result_status (const lcb_RESPPING *resp, size_t index)
lcb_STATUS lcb_respping_result_id (const lcb_RESPPING *resp, size_t index, const char **endpoint_id, size_t *endpoint_id_len)
lcb_STATUS lcb_respping_result_service (const lcb_RESPPING *resp, size_t index, lcb_PING_SERVICE *type)
lcb_STATUS lcb_respping_result_remote (const lcb_RESPPING *resp, size_t index, const char **address, size_t *address_len)
lcb_STATUS lcb_respping_result_local (const lcb_RESPPING *resp, size_t index, const char **address, size_t *address_len)
lcb_STATUS lcb_respping_result_latency (const lcb_RESPPING *resp, size_t index, uint64_t *latency)
lcb_STATUS lcb_respping_result_namespace (const lcb_RESPPING *resp, size_t index, const char **name, size_t *name_len)
 LCB_DEPRECATED2 (1 lcb_STATUS lcb_respping_result_scope(const lcb_RESPPING *resp, size_t index, const char **name, size_t *name_len), "Use lcb_respping_result_namespace")
lcb_STATUS lcb_cmdping_create (lcb_CMDPING **cmd)
lcb_STATUS lcb_cmdping_destroy (lcb_CMDPING *cmd)
lcb_STATUS lcb_cmdping_parent_span (lcb_CMDPING *cmd, lcbtrace_SPAN *span)
lcb_STATUS lcb_cmdping_report_id (lcb_CMDPING *cmd, const char *report_id, size_t report_id_len)
lcb_STATUS lcb_cmdping_all (lcb_CMDPING *cmd)
lcb_STATUS lcb_cmdping_kv (lcb_CMDPING *cmd, int enable)
lcb_STATUS lcb_cmdping_query (lcb_CMDPING *cmd, int enable)
lcb_STATUS lcb_cmdping_views (lcb_CMDPING *cmd, int enable)
lcb_STATUS lcb_cmdping_search (lcb_CMDPING *cmd, int enable)
lcb_STATUS lcb_cmdping_analytics (lcb_CMDPING *cmd, int enable)
lcb_STATUS lcb_cmdping_no_metrics (lcb_CMDPING *cmd, int enable)
lcb_STATUS lcb_cmdping_encode_json (lcb_CMDPING *cmd, int enable, int pretty, int with_details)
lcb_STATUS lcb_cmdping_timeout (lcb_CMDPING *cmd, uint32_t timeout)
lcb_STATUS lcb_ping (lcb_INSTANCE *instance, void *cookie, const lcb_CMDPING *cmd)
lcb_STATUS lcb_respdiag_status (const lcb_RESPDIAG *resp)
lcb_STATUS lcb_respdiag_cookie (const lcb_RESPDIAG *resp, void **cookie)
lcb_STATUS lcb_respdiag_value (const lcb_RESPDIAG *resp, const char **json, size_t *json_len)
lcb_STATUS lcb_cmddiag_create (lcb_CMDDIAG **cmd)
lcb_STATUS lcb_cmddiag_destroy (lcb_CMDDIAG *cmd)
lcb_STATUS lcb_cmddiag_report_id (lcb_CMDDIAG *cmd, const char *report_id, size_t report_id_len)
lcb_STATUS lcb_cmddiag_prettify (lcb_CMDDIAG *cmd, int enable)
lcb_STATUS lcb_diag (lcb_INSTANCE *instance, void *cookie, const lcb_CMDDIAG *cmd)
Returns diagnostics report about network connections. More...


typedef struct lcb_RESPPING_ lcb_RESPPING
typedef struct lcb_CMDPING_ lcb_CMDPING
typedef struct lcb_RESPDIAG_ lcb_RESPDIAG
typedef struct lcb_CMDDIAG_ lcb_CMDDIAG


enum  lcb_PING_STATUS
Status of the service More...
enum  lcb_PING_SERVICE
Type of the service. More...

Function Documentation

◆ lcb_diag()

lcb_STATUS lcb_diag ( lcb_INSTANCE instance,
void *  cookie,
const lcb_CMDDIAG *  cmd 

Returns diagnostics report about network connections.

lcb_CMDDIAG cmd = { 0 };
lcb_diag(instance, fp, &cmd);
lcb_install_callback(instance, LCB_CALLBACK_DIAG, diag_callback);
void diag_callback(lcb_INSTANCE, int, const lcb_RESPBASE *rb)
const lcb_RESPDIAG *resp = (const lcb_RESPDIAG *)rb;
char* json;
size_t json_len;
lcb_STATUS rc = lcb_respdiag_status(resp);
if (rc != LCB_SUCCESS) {
fprintf(stderr, "failed: %s\n", lcb_strerror_short(rc));
} else {
lcb_respdiag_value(resp, &json, &json_len);
if (json) {
fprintf(stderr, "\n%.*s", json_len, json);
instancethe library handle
cookiethe cookie passed in the callback
cmdcommand structure.
status code for scheduling.

Enumeration Type Documentation


Status of the service



Type of the service.

This enumeration is used in PING responses.