Merge pull request #58 from cdimitroulas/improve-docs

improve docs for createConnection
This commit is contained in:
Nicolas Dextraze 2018-07-09 09:12:43 -07:00 committed by GitHub
commit c3a63ff8b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,27 @@ function createFromGossipSeeds(connectionSettings, gossipSeeds, connectionName)
* @public * @public
* @alias createConnection * @alias createConnection
* @param {object} settings * @param {object} settings
* @param {boolean} [settings.verboseLogging=false]
* @param {number} [settings.maxQueueSize=5000]
* @param {number} [settings.maxConcurrentItems=5000]
* @param {number} [settings.maxRetries=10]
* @param {number} [settings.maxReconnections=10]
* @param {boolean} [settings.requireMaster=true]
* @param {number} [settings.reconnectionDelay=100]
* @param {number} [settings.operationTimeout=7000]
* @param {number} [settings.operationTimeoutCheckPeriod=1000]
* @param {object} [settings.defaultUserCredentials=null] - The default user credentials to use for requests
* @param {boolean} [settings.useSslConnection=false] - Whether to use SSL or not
* @param {object} [settings.targetHost=null]
* @param {boolean} [settings.validateServer=false]
* @param {boolean} [settings.failOnNoServerResponse=false]
* @param {number} [settings.heartbeatInterval=750]
* @param {number} [settings.heartbeatTimeout=1500]
* @param {number} [settings.clientConnectionTimeout=1000]
* @param {string} [settings.clusterDns='']
* @param {number} [settings.maxDiscoverAttempts=10]
* @param {number} [settings.externalGossipPort=0]
* @param {number} [settings.gossipTimeout=1000]
* @param {string|object|array} endPointOrGossipSeeds * @param {string|object|array} endPointOrGossipSeeds
* @param {string} [connectionName] * @param {string} [connectionName]
* @returns {EventStoreNodeConnection} * @returns {EventStoreNodeConnection}
@ -130,4 +151,4 @@ module.exports.create = function(settings, endPointOrGossipSeeds, connectionName
if (typeof endPointOrGossipSeeds === 'object') return createFromTcpEndpoint(settings, endPointOrGossipSeeds, connectionName); if (typeof endPointOrGossipSeeds === 'object') return createFromTcpEndpoint(settings, endPointOrGossipSeeds, connectionName);
if (typeof endPointOrGossipSeeds === 'string') return createFromStringEndpoint(settings, endPointOrGossipSeeds, connectionName); if (typeof endPointOrGossipSeeds === 'string') return createFromStringEndpoint(settings, endPointOrGossipSeeds, connectionName);
throw new TypeError('endPointOrGossipSeeds must be an object, a string or an array.'); throw new TypeError('endPointOrGossipSeeds must be an object, a string or an array.');
}; };