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

Function validateProtocolOptions

lib/client-options.js:229–237  ·  view source on GitHub ↗

* Validates the protocol options. * @param {ClientOptions.protocolOptions} protocolOptions * @private

(protocolOptions)

Source from the content-addressed store, hash-verified

227 * @private
228 */
229function validateProtocolOptions(protocolOptions) {
230 if (!protocolOptions) {
231 throw new TypeError('protocolOptions not defined in options');
232 }
233 const version = protocolOptions.maxVersion;
234 if (version && (typeof version !== 'number' || !types.protocolVersion.isSupported(version))) {
235 throw new TypeError(util.format('protocolOptions.maxVersion provided (%s) is invalid', version));
236 }
237}
238
239/**
240 * Validates the socket options.

Callers 1

extendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected