This function allows an application to get information about a working cluster.
MCO_RET mco_cluster_discover(
/*IN*/ const char * conn_string,
/*IN*/ timer_unit timeout,
/*OUT*/ mco_cluster_node_info_t *nodes_info,
/*IN/OUT*/ uint2 *n_nodes_info);
conn_string
timeout
nodes_info
address, nodeID and Qrank).n_nodes_info
nodes_info array. On input, it specifies the allocated size of array, on the output - actual number of filled elementsThis function gets information about a working cluster. Note, that it's not necessary to call this function before
mco_cluster_db_open().This function is similar to mco_cluster_get_active_nodes()
with the difference that mco_cluster_discover() can be called on any network node (not necessarily a node that is running cluster at the moment)
and returns a list of cluster nodes with their IPs, IDs.
MCO_S_OK
n_nodes_info contains the actual size of the nodes_info arrayMCO_E_NW_INVADDR
conn_string doesn't contain valid addressMCO_E_NW_TIMEOUT
MCO_E_NW_SOCKIOCTL
ioctl() syscallMCO_E_NW_SOCKOPT
setsockopt() syscallMCO_E_NW_SELECT
select() syscallMCO_E_NW_CONNECT
connect() syscallMCO_E_NW_SENDERR
send() syscallMCO_E_NW_RECVERR
recv() syscall