nodes(role = "all") {
        if (role !== "all" && role !== "master" && role !== "slave") {
            throw new Error('Invalid role "' + role + '". Expected "all", "master" or "slave"');
        }
        return this.connectionPool.getNodes(role);
    }
Get nodes with the specified role

@param {NodeRole} [role='all']
@returns {any[]}
@memberof Cluster