= lcb_get_server_list(3couchbase) :doctype: manpage Trond Norbye NAME ---- lcb_get_server_list - get the list of servers in use SYNOPSIS -------- cc [ flag ... ] file... -lcouchbase [ library ... ] #include const char * const *lcb_get_server_list(lcb_tinstance); DESCRIPTION ----------- lcb_get_server_list() returns a list of 0-terminated strings consisting of hostname:port entries for the entire cluster. The list is only valid until the next call to libcouchbase (or you return the control to libcouchbase if called from a callback). RETURN VALUES ------------- lcb_get_server_list() returns NULL if the topology of the cluster isn't known, otherwise a NULL terminated list of 0-terminated strings. EXAMPLES -------- #include ... lcb_t instance; ... const char *const *servers = lcb_get_server_list(tmphandle); fprintf(stdout, "Using the following servers: \n"); for (int ii = 0; servers[ii] != NULL; ii++) { fprintf(stdout, "[%s]\n", servers[ii]); } ... ATTRIBUTES ---------- See lcb_attributes(5) for descriptions of the following attributes: [options="header"] |======================================= | ATTRIBUTE TYPE | ATTRIBUTE VALUE | Interface Stability | Committed | MT-Level | MT-Safe |======================================= COPYRIGHT --------- Copyright 2010-2013 Couchbase, Inc. SEE ALSO -------- Learn more at . libcouchbase(3lib), lcb_create(3couchbase), lcb_attributes(5)