@google-cloud/pubsub 2.17.0 → 2.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +1 -0
- package/build/protos/protos.d.ts +2 -1
- package/build/protos/protos.js +7 -0
- package/build/protos/protos.json +14 -1
- package/build/src/iam.d.ts +180 -0
- package/build/src/iam.js +11 -176
- package/build/src/iam.js.map +1 -1
- package/build/src/index.d.ts +13 -4
- package/build/src/index.js +12 -4
- package/build/src/index.js.map +1 -1
- package/build/src/lease-manager.d.ts +7 -2
- package/build/src/lease-manager.js +19 -4
- package/build/src/lease-manager.js.map +1 -1
- package/build/src/publisher/flow-control.d.ts +90 -0
- package/build/src/publisher/flow-control.js +145 -0
- package/build/src/publisher/flow-control.js.map +1 -0
- package/build/src/publisher/flow-publisher.d.ts +95 -0
- package/build/src/publisher/flow-publisher.js +133 -0
- package/build/src/publisher/flow-publisher.js.map +1 -0
- package/build/src/publisher/index.d.ts +33 -5
- package/build/src/publisher/index.js +16 -39
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/publisher/message-batch.d.ts +1 -1
- package/build/src/publisher/message-batch.js +4 -3
- package/build/src/publisher/message-batch.js.map +1 -1
- package/build/src/publisher/message-queues.js.map +1 -1
- package/build/src/publisher/pubsub-message.d.ts +52 -0
- package/build/src/publisher/pubsub-message.js +56 -0
- package/build/src/publisher/pubsub-message.js.map +1 -0
- package/build/src/pubsub.d.ts +354 -4
- package/build/src/pubsub.js +28 -322
- package/build/src/pubsub.js.map +1 -1
- package/build/src/schema.d.ts +9 -4
- package/build/src/schema.js +9 -4
- package/build/src/schema.js.map +1 -1
- package/build/src/snapshot.d.ts +87 -0
- package/build/src/snapshot.js +7 -83
- package/build/src/snapshot.js.map +1 -1
- package/build/src/subscriber.d.ts +6 -0
- package/build/src/subscriber.js +6 -0
- package/build/src/subscriber.js.map +1 -1
- package/build/src/subscription.d.ts +439 -9
- package/build/src/subscription.js +38 -404
- package/build/src/subscription.js.map +1 -1
- package/build/src/topic.d.ts +481 -1
- package/build/src/topic.js +51 -430
- package/build/src/topic.js.map +1 -1
- package/build/src/util.d.ts +2 -1
- package/build/src/util.js +2 -2
- package/build/src/util.js.map +1 -1
- package/build/src/v1/publisher_client.d.ts +246 -15
- package/build/src/v1/publisher_client.js +18 -264
- package/build/src/v1/publisher_client.js.map +1 -1
- package/build/src/v1/publisher_client_config.json +1 -1
- package/build/src/v1/schema_service_client.d.ts +151 -5
- package/build/src/v1/schema_service_client.js +6 -157
- package/build/src/v1/schema_service_client.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +536 -16
- package/build/src/v1/subscriber_client.js +14 -552
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +3 -3
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.Subscription = void 0;
|
|
19
|
-
const promisify_1 = require("@google-cloud/promisify");
|
|
20
19
|
const events_1 = require("events");
|
|
21
20
|
const extend = require("extend");
|
|
22
21
|
const snakeCase = require("lodash.snakecase");
|
|
23
22
|
const iam_1 = require("./iam");
|
|
24
23
|
const snapshot_1 = require("./snapshot");
|
|
25
24
|
const subscriber_1 = require("./subscriber");
|
|
25
|
+
const util_1 = require("./util");
|
|
26
26
|
// JSDoc won't see these, so this is just to let you get typings
|
|
27
27
|
// in your editor of choice.
|
|
28
28
|
//
|
|
@@ -116,7 +116,8 @@ const subscriber_1 = require("./subscriber");
|
|
|
116
116
|
* @param {string} name The name of the subscription.
|
|
117
117
|
* @param {SubscriberOptions} [options] Options for handling messages.
|
|
118
118
|
*
|
|
119
|
-
* @example
|
|
119
|
+
* @example From {@link PubSub#getSubscriptions}
|
|
120
|
+
* ```
|
|
120
121
|
* const {PubSub} = require('@google-cloud/pubsub');
|
|
121
122
|
* const pubsub = new PubSub();
|
|
122
123
|
*
|
|
@@ -124,26 +125,32 @@ const subscriber_1 = require("./subscriber");
|
|
|
124
125
|
* // `subscriptions` is an array of Subscription objects.
|
|
125
126
|
* });
|
|
126
127
|
*
|
|
127
|
-
*
|
|
128
|
+
* ```
|
|
129
|
+
* @example From {@link Topic#getSubscriptions}
|
|
130
|
+
* ```
|
|
128
131
|
* const topic = pubsub.topic('my-topic');
|
|
129
132
|
* topic.getSubscriptions((err, subscriptions) => {
|
|
130
133
|
* // `subscriptions` is an array of Subscription objects.
|
|
131
134
|
* });
|
|
132
135
|
*
|
|
133
|
-
*
|
|
136
|
+
* ```
|
|
137
|
+
* @example {@link Topic#createSubscription}
|
|
138
|
+
* ```
|
|
134
139
|
* const topic = pubsub.topic('my-topic');
|
|
135
140
|
* topic.createSubscription('new-subscription', (err, subscription) => {
|
|
136
141
|
* // `subscription` is a Subscription object.
|
|
137
142
|
* });
|
|
138
143
|
*
|
|
139
|
-
*
|
|
144
|
+
* ```
|
|
145
|
+
* @example {@link Topic#subscription}
|
|
146
|
+
* ```
|
|
140
147
|
* const topic = pubsub.topic('my-topic');
|
|
141
148
|
* const subscription = topic.subscription('my-subscription');
|
|
142
149
|
* // `subscription` is a Subscription object.
|
|
143
150
|
*
|
|
144
|
-
*
|
|
145
|
-
* to register listeners. This will automatically trigger pulling for messages.
|
|
146
|
-
*
|
|
151
|
+
* ```
|
|
152
|
+
* @example Once you have obtained a subscription object, you may begin to register listeners. This will automatically trigger pulling for messages.
|
|
153
|
+
* ```
|
|
147
154
|
* // Register an error handler.
|
|
148
155
|
* subscription.on('error', (err) => {});
|
|
149
156
|
*
|
|
@@ -172,8 +179,9 @@ const subscriber_1 = require("./subscriber");
|
|
|
172
179
|
* // Remove the listener from receiving `message` events.
|
|
173
180
|
* subscription.removeListener('message', onMessage);
|
|
174
181
|
*
|
|
175
|
-
*
|
|
176
|
-
* following configuration
|
|
182
|
+
* ```
|
|
183
|
+
* @example To apply a fine level of flow control, consider the following configuration
|
|
184
|
+
* ```
|
|
177
185
|
* const subscription = topic.subscription('my-sub', {
|
|
178
186
|
* flowControl: {
|
|
179
187
|
* maxMessages: 1,
|
|
@@ -181,6 +189,7 @@ const subscriber_1 = require("./subscriber");
|
|
|
181
189
|
* allowExcessMessages: false
|
|
182
190
|
* }
|
|
183
191
|
* });
|
|
192
|
+
* ```
|
|
184
193
|
*/
|
|
185
194
|
class Subscription extends events_1.EventEmitter {
|
|
186
195
|
constructor(pubsub, name, options) {
|
|
@@ -211,6 +220,7 @@ class Subscription extends events_1.EventEmitter {
|
|
|
211
220
|
* @see [What is Cloud IAM?]{@link https://cloud.google.com/iam/}
|
|
212
221
|
*
|
|
213
222
|
* @example
|
|
223
|
+
* ```
|
|
214
224
|
* //-
|
|
215
225
|
* // Get the IAM policy for your subscription.
|
|
216
226
|
* //-
|
|
@@ -225,6 +235,7 @@ class Subscription extends events_1.EventEmitter {
|
|
|
225
235
|
* const policy = data[0];
|
|
226
236
|
* const apiResponse = data[1];
|
|
227
237
|
* });
|
|
238
|
+
* ```
|
|
228
239
|
*/
|
|
229
240
|
this.iam = new iam_1.IAM(pubsub, this.name);
|
|
230
241
|
this._subscriber = new subscriber_1.Subscriber(this, options);
|
|
@@ -248,60 +259,9 @@ class Subscription extends events_1.EventEmitter {
|
|
|
248
259
|
get projectId() {
|
|
249
260
|
return (this.pubsub && this.pubsub.projectId) || '{{projectId}}';
|
|
250
261
|
}
|
|
251
|
-
/**
|
|
252
|
-
* Closes the Subscription, once this is called you will no longer receive
|
|
253
|
-
* message events unless you call {Subscription#open} or add new message
|
|
254
|
-
* listeners.
|
|
255
|
-
*
|
|
256
|
-
* @param {function} [callback] The callback function.
|
|
257
|
-
* @param {?error} callback.err An error returned while closing the
|
|
258
|
-
* Subscription.
|
|
259
|
-
*
|
|
260
|
-
* @example
|
|
261
|
-
* subscription.close(err => {
|
|
262
|
-
* if (err) {
|
|
263
|
-
* // Error handling omitted.
|
|
264
|
-
* }
|
|
265
|
-
* });
|
|
266
|
-
*
|
|
267
|
-
* // If the callback is omitted a Promise will be returned.
|
|
268
|
-
* subscription.close().then(() => {});
|
|
269
|
-
*/
|
|
270
262
|
close(callback) {
|
|
271
263
|
this._subscriber.close().then(() => callback(), callback);
|
|
272
264
|
}
|
|
273
|
-
/**
|
|
274
|
-
* Create a subscription.
|
|
275
|
-
*
|
|
276
|
-
* @see [Subscriptions: create API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/create}
|
|
277
|
-
*
|
|
278
|
-
* @throws {Error} If subscription name is omitted.
|
|
279
|
-
*
|
|
280
|
-
* @param {string} name The name of the subscription.
|
|
281
|
-
* @param {CreateSubscriptionRequest} [options] See a
|
|
282
|
-
* [Subscription
|
|
283
|
-
* resource](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions).
|
|
284
|
-
* @param {CreateSubscriptionCallback} [callback] Callback function.
|
|
285
|
-
* @returns {Promise<CreateSubscriptionResponse>}
|
|
286
|
-
*
|
|
287
|
-
* @example
|
|
288
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
289
|
-
* const pubsub = new PubSub();
|
|
290
|
-
*
|
|
291
|
-
* const topic = pubsub.topic('my-topic');
|
|
292
|
-
* const subscription = topic.subscription('newMessages');
|
|
293
|
-
* const callback = function(err, subscription, apiResponse) {};
|
|
294
|
-
*
|
|
295
|
-
* subscription.create(callback);
|
|
296
|
-
*
|
|
297
|
-
* @example <caption>With options</caption>
|
|
298
|
-
* subscription.create({
|
|
299
|
-
* ackDeadlineSeconds: 90
|
|
300
|
-
* }, callback);
|
|
301
|
-
*
|
|
302
|
-
* @example <caption>If the callback is omitted, we'll return a
|
|
303
|
-
* Promise.</caption> const [sub, apiResponse] = await subscription.create();
|
|
304
|
-
*/
|
|
305
265
|
create(optsOrCallback, callback) {
|
|
306
266
|
if (!this.topic) {
|
|
307
267
|
throw new Error('Subscriptions can only be created when accessed through Topics');
|
|
@@ -318,49 +278,6 @@ class Subscription extends events_1.EventEmitter {
|
|
|
318
278
|
callback(null, this, resp);
|
|
319
279
|
});
|
|
320
280
|
}
|
|
321
|
-
/**
|
|
322
|
-
* @typedef {array} CreateSnapshotResponse
|
|
323
|
-
* @property {Snapshot} 0 The new {@link Snapshot}.
|
|
324
|
-
* @property {object} 1 The full API response.
|
|
325
|
-
*/
|
|
326
|
-
/**
|
|
327
|
-
* @callback CreateSnapshotCallback
|
|
328
|
-
* @param {?Error} err Request error, if any.
|
|
329
|
-
* @param {Snapshot} snapshot The new {@link Snapshot}.
|
|
330
|
-
* @param {object} apiResponse The full API response.
|
|
331
|
-
*/
|
|
332
|
-
/**
|
|
333
|
-
* Create a snapshot with the given name.
|
|
334
|
-
*
|
|
335
|
-
* @param {string} name Name of the snapshot.
|
|
336
|
-
* @param {object} [gaxOpts] Request configuration options, outlined
|
|
337
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
338
|
-
* @param {CreateSnapshotCallback} [callback] Callback function.
|
|
339
|
-
* @returns {Promise<CreateSnapshotResponse>}
|
|
340
|
-
*
|
|
341
|
-
* @example
|
|
342
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
343
|
-
* const pubsub = new PubSub();
|
|
344
|
-
*
|
|
345
|
-
* const topic = pubsub.topic('my-topic');
|
|
346
|
-
* const subscription = topic.subscription('my-subscription');
|
|
347
|
-
*
|
|
348
|
-
* const callback = (err, snapshot, apiResponse) => {
|
|
349
|
-
* if (!err) {
|
|
350
|
-
* // The snapshot was created successfully.
|
|
351
|
-
* }
|
|
352
|
-
* };
|
|
353
|
-
*
|
|
354
|
-
* subscription.createSnapshot('my-snapshot', callback);
|
|
355
|
-
*
|
|
356
|
-
* //-
|
|
357
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
358
|
-
* //-
|
|
359
|
-
* subscription.createSnapshot('my-snapshot').then((data) => {
|
|
360
|
-
* const snapshot = data[0];
|
|
361
|
-
* const apiResponse = data[1];
|
|
362
|
-
* });
|
|
363
|
-
*/
|
|
364
281
|
createSnapshot(name, optsOrCallback, callback) {
|
|
365
282
|
if (typeof name !== 'string') {
|
|
366
283
|
throw new Error('A name is required to create a snapshot.');
|
|
@@ -386,35 +303,6 @@ class Subscription extends events_1.EventEmitter {
|
|
|
386
303
|
callback(null, snapshot, resp);
|
|
387
304
|
});
|
|
388
305
|
}
|
|
389
|
-
/**
|
|
390
|
-
* Delete the subscription. Pull requests from the current subscription will
|
|
391
|
-
* be errored once unsubscription is complete.
|
|
392
|
-
*
|
|
393
|
-
* @see [Subscriptions: delete API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/delete}
|
|
394
|
-
*
|
|
395
|
-
* @param {object} [gaxOpts] Request configuration options, outlined
|
|
396
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
397
|
-
* @param {function} [callback] The callback function.
|
|
398
|
-
* @param {?error} callback.err An error returned while making this
|
|
399
|
-
* request.
|
|
400
|
-
* @param {object} callback.apiResponse Raw API response.
|
|
401
|
-
*
|
|
402
|
-
* @example
|
|
403
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
404
|
-
* const pubsub = new PubSub();
|
|
405
|
-
*
|
|
406
|
-
* const topic = pubsub.topic('my-topic');
|
|
407
|
-
* const subscription = topic.subscription('my-subscription');
|
|
408
|
-
*
|
|
409
|
-
* subscription.delete((err, apiResponse) => {});
|
|
410
|
-
*
|
|
411
|
-
* //-
|
|
412
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
413
|
-
* //-
|
|
414
|
-
* subscription.delete().then((data) => {
|
|
415
|
-
* const apiResponse = data[0];
|
|
416
|
-
* });
|
|
417
|
-
*/
|
|
418
306
|
delete(optsOrCallback, callback) {
|
|
419
307
|
const gaxOpts = typeof optsOrCallback === 'object' ? optsOrCallback : {};
|
|
420
308
|
callback = typeof optsOrCallback === 'function' ? optsOrCallback : callback;
|
|
@@ -431,37 +319,6 @@ class Subscription extends events_1.EventEmitter {
|
|
|
431
319
|
gaxOpts,
|
|
432
320
|
}, callback);
|
|
433
321
|
}
|
|
434
|
-
/**
|
|
435
|
-
* @typedef {array} SubscriptionDetachedResponse
|
|
436
|
-
* @property {boolean} 0 Whether the subscription is detached.
|
|
437
|
-
*/
|
|
438
|
-
/**
|
|
439
|
-
* @callback SubscriptionDetachedCallback
|
|
440
|
-
* @param {?Error} err Request error, if any.
|
|
441
|
-
* @param {boolean} exists Whether the subscription is detached.
|
|
442
|
-
*/
|
|
443
|
-
/**
|
|
444
|
-
* Check if a subscription is detached.
|
|
445
|
-
*
|
|
446
|
-
* @param {SubscriptionDetachedCallback} [callback] Callback function.
|
|
447
|
-
* @returns {Promise<SubscriptionDetachedResponse>}
|
|
448
|
-
*
|
|
449
|
-
* @example
|
|
450
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
451
|
-
* const pubsub = new PubSub();
|
|
452
|
-
*
|
|
453
|
-
* const topic = pubsub.topic('my-topic');
|
|
454
|
-
* const subscription = topic.subscription('my-subscription');
|
|
455
|
-
*
|
|
456
|
-
* subscription.detached((err, exists) => {});
|
|
457
|
-
*
|
|
458
|
-
* //-
|
|
459
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
460
|
-
* //-
|
|
461
|
-
* subscription.detached().then((data) => {
|
|
462
|
-
* const detached = data[0];
|
|
463
|
-
* });
|
|
464
|
-
*/
|
|
465
322
|
detached(callback) {
|
|
466
323
|
this.getMetadata((err, metadata) => {
|
|
467
324
|
if (err) {
|
|
@@ -472,37 +329,6 @@ class Subscription extends events_1.EventEmitter {
|
|
|
472
329
|
}
|
|
473
330
|
});
|
|
474
331
|
}
|
|
475
|
-
/**
|
|
476
|
-
* @typedef {array} SubscriptionExistsResponse
|
|
477
|
-
* @property {boolean} 0 Whether the subscription exists
|
|
478
|
-
*/
|
|
479
|
-
/**
|
|
480
|
-
* @callback SubscriptionExistsCallback
|
|
481
|
-
* @param {?Error} err Request error, if any.
|
|
482
|
-
* @param {boolean} exists Whether the subscription exists.
|
|
483
|
-
*/
|
|
484
|
-
/**
|
|
485
|
-
* Check if a subscription exists.
|
|
486
|
-
*
|
|
487
|
-
* @param {SubscriptionExistsCallback} [callback] Callback function.
|
|
488
|
-
* @returns {Promise<SubscriptionExistsResponse>}
|
|
489
|
-
*
|
|
490
|
-
* @example
|
|
491
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
492
|
-
* const pubsub = new PubSub();
|
|
493
|
-
*
|
|
494
|
-
* const topic = pubsub.topic('my-topic');
|
|
495
|
-
* const subscription = topic.subscription('my-subscription');
|
|
496
|
-
*
|
|
497
|
-
* subscription.exists((err, exists) => {});
|
|
498
|
-
*
|
|
499
|
-
* //-
|
|
500
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
501
|
-
* //-
|
|
502
|
-
* subscription.exists().then((data) => {
|
|
503
|
-
* const exists = data[0];
|
|
504
|
-
* });
|
|
505
|
-
*/
|
|
506
332
|
exists(callback) {
|
|
507
333
|
this.getMetadata(err => {
|
|
508
334
|
if (!err) {
|
|
@@ -516,46 +342,6 @@ class Subscription extends events_1.EventEmitter {
|
|
|
516
342
|
callback(err);
|
|
517
343
|
});
|
|
518
344
|
}
|
|
519
|
-
/**
|
|
520
|
-
* @typedef {array} GetSubscriptionResponse
|
|
521
|
-
* @property {Subscription} 0 The {@link Subscription}.
|
|
522
|
-
* @property {object} 1 The full API response.
|
|
523
|
-
*/
|
|
524
|
-
/**
|
|
525
|
-
* @callback GetSubscriptionCallback
|
|
526
|
-
* @param {?Error} err Request error, if any.
|
|
527
|
-
* @param {Subscription} subscription The {@link Subscription}.
|
|
528
|
-
* @param {object} apiResponse The full API response.
|
|
529
|
-
*/
|
|
530
|
-
/**
|
|
531
|
-
* Get a subscription if it exists.
|
|
532
|
-
*
|
|
533
|
-
* @param {object} [gaxOpts] Request configuration options, outlined
|
|
534
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
535
|
-
* @param {boolean} [gaxOpts.autoCreate=false] Automatically create the
|
|
536
|
-
* subscription if it does not already exist.
|
|
537
|
-
* @param {GetSubscriptionCallback} [callback] Callback function.
|
|
538
|
-
* @returns {Promise<GetSubscriptionResponse>}
|
|
539
|
-
*
|
|
540
|
-
* @example
|
|
541
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
542
|
-
* const pubsub = new PubSub();
|
|
543
|
-
*
|
|
544
|
-
* const topic = pubsub.topic('my-topic');
|
|
545
|
-
* const subscription = topic.subscription('my-subscription');
|
|
546
|
-
*
|
|
547
|
-
* subscription.get((err, subscription, apiResponse) => {
|
|
548
|
-
* // The `subscription` data has been populated.
|
|
549
|
-
* });
|
|
550
|
-
*
|
|
551
|
-
* //-
|
|
552
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
553
|
-
* //-
|
|
554
|
-
* subscription.get().then((data) => {
|
|
555
|
-
* const subscription = data[0];
|
|
556
|
-
* const apiResponse = data[1];
|
|
557
|
-
* });
|
|
558
|
-
*/
|
|
559
345
|
get(optsOrCallback, callback) {
|
|
560
346
|
const gaxOpts = typeof optsOrCallback === 'object' ? optsOrCallback : {};
|
|
561
347
|
callback = typeof optsOrCallback === 'function' ? optsOrCallback : callback;
|
|
@@ -573,43 +359,6 @@ class Subscription extends events_1.EventEmitter {
|
|
|
573
359
|
this.create({ gaxOpts }, callback);
|
|
574
360
|
});
|
|
575
361
|
}
|
|
576
|
-
/**
|
|
577
|
-
* @typedef {array} GetSubscriptionMetadataResponse
|
|
578
|
-
* @property {object} 0 The full API response.
|
|
579
|
-
*/
|
|
580
|
-
/**
|
|
581
|
-
* @callback GetSubscriptionMetadataCallback
|
|
582
|
-
* @param {?Error} err Request error, if any.
|
|
583
|
-
* @param {object} apiResponse The full API response.
|
|
584
|
-
*/
|
|
585
|
-
/**
|
|
586
|
-
* Fetches the subscriptions metadata.
|
|
587
|
-
*
|
|
588
|
-
* @param {object} [gaxOpts] Request configuration options, outlined
|
|
589
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
590
|
-
* @param {GetSubscriptionMetadataCallback} [callback] Callback function.
|
|
591
|
-
* @returns {Promise<GetSubscriptionMetadataResponse>}
|
|
592
|
-
*
|
|
593
|
-
* @example
|
|
594
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
595
|
-
* const pubsub = new PubSub();
|
|
596
|
-
*
|
|
597
|
-
* const topic = pubsub.topic('my-topic');
|
|
598
|
-
* const subscription = topic.subscription('my-subscription');
|
|
599
|
-
*
|
|
600
|
-
* subscription.getMetadata((err, apiResponse) => {
|
|
601
|
-
* if (err) {
|
|
602
|
-
* // Error handling omitted.
|
|
603
|
-
* }
|
|
604
|
-
* });
|
|
605
|
-
*
|
|
606
|
-
* //-
|
|
607
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
608
|
-
* //-
|
|
609
|
-
* subscription.getMetadata().then((data) => {
|
|
610
|
-
* const apiResponse = data[0];
|
|
611
|
-
* });
|
|
612
|
-
*/
|
|
613
362
|
getMetadata(optsOrCallback, callback) {
|
|
614
363
|
const gaxOpts = typeof optsOrCallback === 'object' ? optsOrCallback : {};
|
|
615
364
|
callback = typeof optsOrCallback === 'function' ? optsOrCallback : callback;
|
|
@@ -628,62 +377,6 @@ class Subscription extends events_1.EventEmitter {
|
|
|
628
377
|
callback(err, apiResponse);
|
|
629
378
|
});
|
|
630
379
|
}
|
|
631
|
-
/**
|
|
632
|
-
* @typedef {array} ModifyPushConfigResponse
|
|
633
|
-
* @property {object} 0 The full API response.
|
|
634
|
-
*/
|
|
635
|
-
/**
|
|
636
|
-
* @callback ModifyPushConfigCallback
|
|
637
|
-
* @param {?Error} err Request error, if any.
|
|
638
|
-
* @param {object} apiResponse The full API response.
|
|
639
|
-
*/
|
|
640
|
-
/**
|
|
641
|
-
* Modify the push config for the subscription.
|
|
642
|
-
*
|
|
643
|
-
* @param {object} config The push config.
|
|
644
|
-
* @param {string} config.pushEndpoint A URL locating the endpoint to which
|
|
645
|
-
* messages should be published.
|
|
646
|
-
* @param {object} config.attributes [PushConfig attributes](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#google.pubsub.v1.PushConfig).
|
|
647
|
-
* @param {object} config.oidcToken If specified, Pub/Sub will generate and
|
|
648
|
-
* attach an OIDC JWT token as an `Authorization` header in the HTTP
|
|
649
|
-
* request for every pushed message. This object should have the same
|
|
650
|
-
* structure as [OidcToken]{@link google.pubsub.v1.OidcToken}
|
|
651
|
-
* @param {object} [gaxOpts] Request configuration options, outlined
|
|
652
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
653
|
-
* @param {ModifyPushConfigCallback} [callback] Callback function.
|
|
654
|
-
* @returns {Promise<ModifyPushConfigResponse>}
|
|
655
|
-
*
|
|
656
|
-
* @example
|
|
657
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
658
|
-
* const pubsub = new PubSub();
|
|
659
|
-
*
|
|
660
|
-
* const topic = pubsub.topic('my-topic');
|
|
661
|
-
* const subscription = topic.subscription('my-subscription');
|
|
662
|
-
*
|
|
663
|
-
* const pushConfig = {
|
|
664
|
-
* pushEndpoint: 'https://mydomain.com/push',
|
|
665
|
-
* attributes: {
|
|
666
|
-
* key: 'value'
|
|
667
|
-
* },
|
|
668
|
-
* oidcToken: {
|
|
669
|
-
* serviceAccountEmail: 'myproject@appspot.gserviceaccount.com',
|
|
670
|
-
* audience: 'myaudience'
|
|
671
|
-
* }
|
|
672
|
-
* };
|
|
673
|
-
*
|
|
674
|
-
* subscription.modifyPushConfig(pushConfig, (err, apiResponse) => {
|
|
675
|
-
* if (err) {
|
|
676
|
-
* // Error handling omitted.
|
|
677
|
-
* }
|
|
678
|
-
* });
|
|
679
|
-
*
|
|
680
|
-
* //-
|
|
681
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
682
|
-
* //-
|
|
683
|
-
* subscription.modifyPushConfig(pushConfig).then((data) => {
|
|
684
|
-
* const apiResponse = data[0];
|
|
685
|
-
* });
|
|
686
|
-
*/
|
|
687
380
|
modifyPushConfig(config, optsOrCallback, callback) {
|
|
688
381
|
const gaxOpts = typeof optsOrCallback === 'object' ? optsOrCallback : {};
|
|
689
382
|
callback = typeof optsOrCallback === 'function' ? optsOrCallback : callback;
|
|
@@ -705,6 +398,7 @@ class Subscription extends events_1.EventEmitter {
|
|
|
705
398
|
* new `message` event listener which will also re-open the Subscription.
|
|
706
399
|
*
|
|
707
400
|
* @example
|
|
401
|
+
* ```
|
|
708
402
|
* subscription.on('message', message => message.ack());
|
|
709
403
|
*
|
|
710
404
|
* // Close the subscription.
|
|
@@ -718,49 +412,13 @@ class Subscription extends events_1.EventEmitter {
|
|
|
718
412
|
*
|
|
719
413
|
* // Resume receiving messages.
|
|
720
414
|
* subscription.open();
|
|
415
|
+
* ```
|
|
721
416
|
*/
|
|
722
417
|
open() {
|
|
723
418
|
if (!this._subscriber.isOpen) {
|
|
724
419
|
this._subscriber.open();
|
|
725
420
|
}
|
|
726
421
|
}
|
|
727
|
-
/**
|
|
728
|
-
* @typedef {array} SeekResponse
|
|
729
|
-
* @property {object} 0 The full API response.
|
|
730
|
-
*/
|
|
731
|
-
/**
|
|
732
|
-
* @callback SeekCallback
|
|
733
|
-
* @param {?Error} err Request error, if any.
|
|
734
|
-
* @param {object} apiResponse The full API response.
|
|
735
|
-
*/
|
|
736
|
-
/**
|
|
737
|
-
* Seeks an existing subscription to a point in time or a given snapshot.
|
|
738
|
-
*
|
|
739
|
-
* @param {string|date} snapshot The point to seek to. This will accept the
|
|
740
|
-
* name of the snapshot or a Date object.
|
|
741
|
-
* @param {object} [gaxOpts] Request configuration options, outlined
|
|
742
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
743
|
-
* @param {SeekCallback} [callback] Callback function.
|
|
744
|
-
* @returns {Promise<SeekResponse>}
|
|
745
|
-
*
|
|
746
|
-
* @example
|
|
747
|
-
* const callback = (err, resp) => {
|
|
748
|
-
* if (!err) {
|
|
749
|
-
* // Seek was successful.
|
|
750
|
-
* }
|
|
751
|
-
* };
|
|
752
|
-
*
|
|
753
|
-
* subscription.seek('my-snapshot', callback);
|
|
754
|
-
*
|
|
755
|
-
* //-
|
|
756
|
-
* // Alternatively, to specify a certain point in time, you can provide a
|
|
757
|
-
* Date
|
|
758
|
-
* // object.
|
|
759
|
-
* //-
|
|
760
|
-
* const date = new Date('October 21 2015');
|
|
761
|
-
*
|
|
762
|
-
* subscription.seek(date, callback);
|
|
763
|
-
*/
|
|
764
422
|
seek(snapshot, optsOrCallback, callback) {
|
|
765
423
|
const gaxOpts = typeof optsOrCallback === 'object' ? optsOrCallback : {};
|
|
766
424
|
callback = typeof optsOrCallback === 'function' ? optsOrCallback : callback;
|
|
@@ -787,42 +445,6 @@ class Subscription extends events_1.EventEmitter {
|
|
|
787
445
|
gaxOpts,
|
|
788
446
|
}, callback);
|
|
789
447
|
}
|
|
790
|
-
/**
|
|
791
|
-
* @typedef {array} SetSubscriptionMetadataResponse
|
|
792
|
-
* @property {object} 0 The full API response.
|
|
793
|
-
*/
|
|
794
|
-
/**
|
|
795
|
-
* @callback SetSubscriptionMetadataCallback
|
|
796
|
-
* @param {?Error} err Request error, if any.
|
|
797
|
-
* @param {object} apiResponse The full API response.
|
|
798
|
-
*/
|
|
799
|
-
/**
|
|
800
|
-
* Update the subscription object.
|
|
801
|
-
*
|
|
802
|
-
* @param {object} metadata The subscription metadata.
|
|
803
|
-
* @param {object} [gaxOpts] Request configuration options, outlined
|
|
804
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
805
|
-
* @param {SetSubscriptionMetadataCallback} [callback] Callback function.
|
|
806
|
-
* @returns {Promise<SetSubscriptionMetadataResponse>}
|
|
807
|
-
*
|
|
808
|
-
* @example
|
|
809
|
-
* const metadata = {
|
|
810
|
-
* key: 'value'
|
|
811
|
-
* };
|
|
812
|
-
*
|
|
813
|
-
* subscription.setMetadata(metadata, (err, apiResponse) => {
|
|
814
|
-
* if (err) {
|
|
815
|
-
* // Error handling omitted.
|
|
816
|
-
* }
|
|
817
|
-
* });
|
|
818
|
-
*
|
|
819
|
-
* //-
|
|
820
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
821
|
-
* //-
|
|
822
|
-
* subscription.setMetadata(metadata).then((data) => {
|
|
823
|
-
* const apiResponse = data[0];
|
|
824
|
-
* });
|
|
825
|
-
*/
|
|
826
448
|
setMetadata(metadata, optsOrCallback, callback) {
|
|
827
449
|
const gaxOpts = typeof optsOrCallback === 'object' ? optsOrCallback : {};
|
|
828
450
|
callback = typeof optsOrCallback === 'function' ? optsOrCallback : callback;
|
|
@@ -860,7 +482,9 @@ class Subscription extends events_1.EventEmitter {
|
|
|
860
482
|
* @returns {Snapshot}
|
|
861
483
|
*
|
|
862
484
|
* @example
|
|
485
|
+
* ```
|
|
863
486
|
* const snapshot = subscription.snapshot('my-snapshot');
|
|
487
|
+
* ```
|
|
864
488
|
*/
|
|
865
489
|
snapshot(name) {
|
|
866
490
|
return this.pubsub.snapshot.call(this, name);
|
|
@@ -931,7 +555,17 @@ exports.Subscription = Subscription;
|
|
|
931
555
|
* All async methods (except for streams) will return a Promise in the event
|
|
932
556
|
* that a callback is omitted.
|
|
933
557
|
*/
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
558
|
+
util_1.promisifySome(Subscription, Subscription.prototype, [
|
|
559
|
+
'close',
|
|
560
|
+
'create',
|
|
561
|
+
'createSnapshot',
|
|
562
|
+
'delete',
|
|
563
|
+
'detached',
|
|
564
|
+
'exists',
|
|
565
|
+
'get',
|
|
566
|
+
'getMetadata',
|
|
567
|
+
'modifyPushConfig',
|
|
568
|
+
'seek',
|
|
569
|
+
'setMetadata',
|
|
570
|
+
]);
|
|
937
571
|
//# sourceMappingURL=subscription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/subscription.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"subscription.js","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