@google-cloud/pubsub
Advanced tools
Comparing version 4.0.2 to 4.0.3
@@ -61,4 +61,3 @@ /// <reference types="node" /> | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -71,3 +70,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new PublisherClient({fallback: 'rest'}, gax); | ||
* const client = new PublisherClient({fallback: true}, gax); | ||
* ``` | ||
@@ -74,0 +73,0 @@ */ |
@@ -64,4 +64,3 @@ "use strict"; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -74,3 +73,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new PublisherClient({fallback: 'rest'}, gax); | ||
* const client = new PublisherClient({fallback: true}, gax); | ||
* ``` | ||
@@ -133,3 +132,3 @@ */ | ||
} | ||
else if (opts.fallback === 'rest') { | ||
else { | ||
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); | ||
@@ -136,0 +135,0 @@ } |
@@ -60,4 +60,3 @@ /// <reference types="node" /> | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -70,3 +69,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new SchemaServiceClient({fallback: 'rest'}, gax); | ||
* const client = new SchemaServiceClient({fallback: true}, gax); | ||
* ``` | ||
@@ -73,0 +72,0 @@ */ |
@@ -63,4 +63,3 @@ "use strict"; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -73,3 +72,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new SchemaServiceClient({fallback: 'rest'}, gax); | ||
* const client = new SchemaServiceClient({fallback: true}, gax); | ||
* ``` | ||
@@ -132,3 +131,3 @@ */ | ||
} | ||
else if (opts.fallback === 'rest') { | ||
else { | ||
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); | ||
@@ -135,0 +134,0 @@ } |
@@ -66,4 +66,3 @@ "use strict"; | ||
* Follows the structure of {@link gapicConfig}. | ||
* @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. | ||
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC. | ||
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. | ||
* For more information, please check the | ||
@@ -76,3 +75,3 @@ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. | ||
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC | ||
* const client = new SubscriberClient({fallback: 'rest'}, gax); | ||
* const client = new SubscriberClient({fallback: true}, gax); | ||
* ``` | ||
@@ -135,3 +134,3 @@ */ | ||
} | ||
else if (opts.fallback === 'rest') { | ||
else { | ||
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); | ||
@@ -164,3 +163,3 @@ } | ||
this.descriptors.stream = { | ||
streamingPull: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, opts.fallback === 'rest'), | ||
streamingPull: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback), | ||
}; | ||
@@ -167,0 +166,0 @@ // Put together the default options sent with requests. |
{ | ||
"name": "@google-cloud/pubsub", | ||
"description": "Cloud Pub/Sub Client Library for Node.js", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
3864813
65043