Connect timeout in Node.js SDK 3.0

Hello people,
I’m using the 3.0.x version of Node.js SDK and till now haven’t found a way to set connectionTimeout (connectTimeput?). In the earlier version of the SDK it was properly documented but the current version of documentation has no reference of this.

I checked the constructor in the SDK code itself and found that these parameters can be sent to the cluster connection request.
Copied from couchnode > lib > cluster.js

this._connStr = connStr;
this._trustStorePath = options.trustStorePath;
this._kvTimeout = options.kvTimeout;
this._kvDurableTimeout = options.kvDurableTimeout;
this._viewTimeout = options.viewTimeout;
this._queryTimeout = options.queryTimeout;
this._analyticsTimeout = options.analyticsTimeout;
this._searchTimeout = options.searchTimeout;
this._managementTimeout = options.managementTimeout;

Please let me know what is the correct way or if possible direct me to some reference materials.


@umeshmahato see if this helps

var couchbase = require('couchbase');

// Setup Cluster Connection Object
var connString = 'couchbase://localhost';
const options = {username: 'Administrator', password: 'password'};
var cluster = new couchbase.Cluster(connString, options);

// Setup Bucket object to be reused within the code
var bucket = cluster.bucket('travel-sample');
const collection = bucket.defaultCollection();
const docKey = 'airport_1254';

var result;
try {
    result = collection.get(docKey, {timeout: 1000},
        (err, res) => {
            if (res) console.log(JSON.stringify(res));
            if (err) console.log(err);
        .catch((e) => {
} catch (e) {