예제 #1
0
static mcon_collection *mongo_rp_collect_any(mongo_con_manager *manager, mongo_read_preference *rp)
{
	/* We add the MONGO_NODE_STANDALONE and MONGO_NODE_MONGOS here, because
	 * that's needed for the MULTIPLE connection type. Right now, that only is
	 * used for MONGO_RP_NEAREST, and MONGO_RP_NEAREST uses this function (see
	 * below in mongo_find_all_candidate_servers(). */
	return filter_connections(manager, MONGO_NODE_STANDALONE | MONGO_NODE_PRIMARY | MONGO_NODE_SECONDARY | MONGO_NODE_MONGOS, rp);
}
예제 #2
0
/* Wrappers for the different collection types */
static mcon_collection *mongo_rp_collect_primary(mongo_con_manager *manager, mongo_read_preference *rp)
{
	return filter_connections(manager, MONGO_NODE_PRIMARY, rp);
}