MCPcopy Create free account
hub / github.com/apache/cassandra-nodejs-driver / validateSocketOptions

Function validateSocketOptions

lib/client-options.js:244–254  ·  view source on GitHub ↗

* Validates the socket options. * @param {ClientOptions.socketOptions} socketOptions * @private

(socketOptions)

Source from the content-addressed store, hash-verified

242 * @private
243 */
244function validateSocketOptions(socketOptions) {
245 if (!socketOptions) {
246 throw new TypeError('socketOptions not defined in options');
247 }
248 if (typeof socketOptions.readTimeout !== 'number') {
249 throw new TypeError('socketOptions.readTimeout must be a Number');
250 }
251 if (typeof socketOptions.coalescingThreshold !== 'number' || socketOptions.coalescingThreshold <= 0) {
252 throw new TypeError('socketOptions.coalescingThreshold must be a positive Number');
253 }
254}
255
256/**
257 * Validates authentication provider and credentials.

Callers 1

extendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected