@google-cloud/pubsub 2.18.0 → 2.18.4
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 +29 -0
- package/build/src/iam.d.ts +180 -0
- package/build/src/iam.js +2 -172
- package/build/src/iam.js.map +1 -1
- package/build/src/index.d.ts +12 -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-publisher.d.ts +6 -0
- package/build/src/publisher/flow-publisher.js +6 -0
- package/build/src/publisher/flow-publisher.js.map +1 -1
- package/build/src/publisher/index.d.ts +35 -0
- package/build/src/publisher/index.js +0 -35
- package/build/src/publisher/index.js.map +1 -1
- 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 +2 -79
- 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 +24 -400
- package/build/src/subscription.js.map +1 -1
- package/build/src/topic.d.ts +466 -1
- package/build/src/topic.js +17 -417
- package/build/src/topic.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 +3 -3
- 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
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
|
|
6
6
|
|
|
7
|
+
### [2.18.4](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.3...v2.18.4) (2021-12-09)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **deps:** update dependency google-gax to v2.28.1 ([#1432](https://www.github.com/googleapis/nodejs-pubsub/issues/1432)) ([98840fc](https://www.github.com/googleapis/nodejs-pubsub/commit/98840fcc38a05be07de6e7dc97d8a79616940df9))
|
|
13
|
+
|
|
14
|
+
### [2.18.3](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.2...v2.18.3) (2021-11-18)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* set only Publish to 5000ms ([#1416](https://www.github.com/googleapis/nodejs-pubsub/issues/1416)) ([1e11001](https://www.github.com/googleapis/nodejs-pubsub/commit/1e110016ea04fc41d2fa80d64a54a11fd4078c60))
|
|
20
|
+
* temporary hold-back on google-gax to avoid timeout issues caused by https://github.com/googleapis/gax-nodejs/pull/1100 ([#1431](https://www.github.com/googleapis/nodejs-pubsub/issues/1431)) ([18c6b18](https://www.github.com/googleapis/nodejs-pubsub/commit/18c6b18f621c410aca968a6bfc850e7a6ea404f4))
|
|
21
|
+
|
|
22
|
+
### [2.18.2](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.1...v2.18.2) (2021-11-08)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **cloud-rad:** move comments for TSDoc ([#1423](https://www.github.com/googleapis/nodejs-pubsub/issues/1423)) ([a40a23e](https://www.github.com/googleapis/nodejs-pubsub/commit/a40a23ee43c6697000996e0ff7070f41610397f5))
|
|
28
|
+
|
|
29
|
+
### [2.18.1](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.0...v2.18.1) (2021-09-27)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* deprecate maxExtension in favour of maxExtensionMinutes ([#1402](https://www.github.com/googleapis/nodejs-pubsub/issues/1402)) ([46b83ba](https://www.github.com/googleapis/nodejs-pubsub/commit/46b83ba14e954cc6bec3f03ca7c3e0bcdfb7597c))
|
|
35
|
+
|
|
7
36
|
## [2.18.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.17.0...v2.18.0) (2021-09-23)
|
|
8
37
|
|
|
9
38
|
|
package/build/src/iam.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export declare type TestIamPermissionsCallback = ResourceCallback<IamPermissions
|
|
|
62
62
|
* @see [What is Cloud IAM?]{@link https://cloud.google.com/iam/}
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
|
+
* ```
|
|
65
66
|
* const {PubSub} = require('@google-cloud/pubsub');
|
|
66
67
|
* const pubsub = new PubSub();
|
|
67
68
|
*
|
|
@@ -70,18 +71,197 @@ export declare type TestIamPermissionsCallback = ResourceCallback<IamPermissions
|
|
|
70
71
|
*
|
|
71
72
|
* const subscription = pubsub.subscription('my-subscription');
|
|
72
73
|
* // subscription.iam
|
|
74
|
+
* ```
|
|
73
75
|
*/
|
|
74
76
|
export declare class IAM {
|
|
75
77
|
pubsub: PubSub;
|
|
76
78
|
request: typeof PubSub.prototype.request;
|
|
77
79
|
id: string;
|
|
78
80
|
constructor(pubsub: PubSub, id: string);
|
|
81
|
+
/**
|
|
82
|
+
* @typedef {array} GetPolicyResponse
|
|
83
|
+
* @property {object} 0 The policy.
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* @callback GetPolicyCallback
|
|
87
|
+
* @param {?Error} err Request error, if any.
|
|
88
|
+
* @param {object} acl The policy.
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* Get the IAM policy
|
|
92
|
+
*
|
|
93
|
+
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
94
|
+
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
95
|
+
* @param {GetPolicyCallback} [callback] Callback function.
|
|
96
|
+
* @returns {Promise<GetPolicyResponse>}
|
|
97
|
+
*
|
|
98
|
+
* @see [Topics: getIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/getIamPolicy}
|
|
99
|
+
* @see [Subscriptions: getIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/getIamPolicy}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```
|
|
103
|
+
* const {PubSub} = require('@google-cloud/pubsub');
|
|
104
|
+
* const pubsub = new PubSub();
|
|
105
|
+
*
|
|
106
|
+
* const topic = pubsub.topic('my-topic');
|
|
107
|
+
* const subscription = topic.subscription('my-subscription');
|
|
108
|
+
*
|
|
109
|
+
* topic.iam.getPolicy(function(err, policy, apiResponse) {});
|
|
110
|
+
*
|
|
111
|
+
* subscription.iam.getPolicy(function(err, policy, apiResponse) {});
|
|
112
|
+
*
|
|
113
|
+
* //-
|
|
114
|
+
* // If the callback is omitted, we'll return a Promise.
|
|
115
|
+
* //-
|
|
116
|
+
* topic.iam.getPolicy().then(function(data) {
|
|
117
|
+
* const policy = data[0];
|
|
118
|
+
* const apiResponse = data[1];
|
|
119
|
+
* });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
79
122
|
getPolicy(gaxOpts?: CallOptions): Promise<GetPolicyResponse>;
|
|
80
123
|
getPolicy(callback: GetPolicyCallback): void;
|
|
81
124
|
getPolicy(gaxOpts: CallOptions, callback: GetPolicyCallback): void;
|
|
125
|
+
/**
|
|
126
|
+
* @typedef {array} SetPolicyResponse
|
|
127
|
+
* @property {object} 0 The policy.
|
|
128
|
+
*/
|
|
129
|
+
/**
|
|
130
|
+
* @callback SetPolicyCallback
|
|
131
|
+
* @param {?Error} err Request error, if any.
|
|
132
|
+
* @param {object} acl The policy.
|
|
133
|
+
*/
|
|
134
|
+
/**
|
|
135
|
+
* Set the IAM policy
|
|
136
|
+
*
|
|
137
|
+
* @throws {Error} If no policy is provided.
|
|
138
|
+
*
|
|
139
|
+
* @param {object} policy The [policy](https://cloud.google.com/pubsub/docs/reference/rest/v1/Policy).
|
|
140
|
+
* @param {array} [policy.bindings] Bindings associate members with roles.
|
|
141
|
+
* @param {Array<object>} [policy.rules] Rules to be applied to the policy.
|
|
142
|
+
* @param {string} [policy.etag] Etags are used to perform a read-modify-write.
|
|
143
|
+
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
144
|
+
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
145
|
+
* @param {SetPolicyCallback} callback Callback function.
|
|
146
|
+
* @returns {Promise<SetPolicyResponse>}
|
|
147
|
+
*
|
|
148
|
+
* @see [Topics: setIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/setIamPolicy}
|
|
149
|
+
* @see [Subscriptions: setIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/setIamPolicy}
|
|
150
|
+
* @see [Policy]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/Policy}
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```
|
|
154
|
+
* const {PubSub} = require('@google-cloud/pubsub');
|
|
155
|
+
* const pubsub = new PubSub();
|
|
156
|
+
*
|
|
157
|
+
* const topic = pubsub.topic('my-topic');
|
|
158
|
+
* const subscription = topic.subscription('my-subscription');
|
|
159
|
+
*
|
|
160
|
+
* const myPolicy = {
|
|
161
|
+
* bindings: [
|
|
162
|
+
* {
|
|
163
|
+
* role: 'roles/pubsub.subscriber',
|
|
164
|
+
* members:
|
|
165
|
+
* ['serviceAccount:myotherproject@appspot.gserviceaccount.com']
|
|
166
|
+
* }
|
|
167
|
+
* ]
|
|
168
|
+
* };
|
|
169
|
+
*
|
|
170
|
+
* topic.iam.setPolicy(myPolicy, function(err, policy, apiResponse) {});
|
|
171
|
+
*
|
|
172
|
+
* subscription.iam.setPolicy(myPolicy, function(err, policy, apiResponse)
|
|
173
|
+
* {});
|
|
174
|
+
*
|
|
175
|
+
* //-
|
|
176
|
+
* // If the callback is omitted, we'll return a Promise.
|
|
177
|
+
* //-
|
|
178
|
+
* topic.iam.setPolicy(myPolicy).then(function(data) {
|
|
179
|
+
* const policy = data[0];
|
|
180
|
+
* const apiResponse = data[1];
|
|
181
|
+
* });
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
82
184
|
setPolicy(policy: Policy, gaxOpts?: CallOptions): Promise<SetPolicyResponse>;
|
|
83
185
|
setPolicy(policy: Policy, gaxOpts: CallOptions, callback: SetPolicyCallback): void;
|
|
84
186
|
setPolicy(policy: Policy, callback: SetPolicyCallback): void;
|
|
187
|
+
/**
|
|
188
|
+
* @callback TestIamPermissionsCallback
|
|
189
|
+
* @param {?Error} err Request error, if any.
|
|
190
|
+
* @param {TestIamPermissionsAPIResponse} permissions A subset of permissions that the caller is allowed.
|
|
191
|
+
* @param {PermissionsResponse} apiResponse The full API response.
|
|
192
|
+
*/
|
|
193
|
+
/**
|
|
194
|
+
* @typedef {array} TestIamPermissionsResponse
|
|
195
|
+
* @property {object[]} 0 A subset of permissions that the caller is allowed.
|
|
196
|
+
* @property {PermissionsResponse} 1 The full API response.
|
|
197
|
+
*/
|
|
198
|
+
/**
|
|
199
|
+
* @typedef {string[]} PermissionsResponse
|
|
200
|
+
* A subset of TestPermissionsRequest.permissions that the caller is allowed.
|
|
201
|
+
* @see https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#google.iam.v1.TestIamPermissionsRequest
|
|
202
|
+
*/
|
|
203
|
+
/**
|
|
204
|
+
* Test a set of permissions for a resource.
|
|
205
|
+
*
|
|
206
|
+
* Permissions with wildcards such as `*` or `storage.*` are not allowed.
|
|
207
|
+
*
|
|
208
|
+
* @throws {Error} If permissions are not provided.
|
|
209
|
+
*
|
|
210
|
+
* @param {string|string[]} permissions The permission(s) to test for.
|
|
211
|
+
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
212
|
+
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
213
|
+
* @param {TestIamPermissionsCallback} [callback] Callback function.
|
|
214
|
+
* @returns {Promise<TestIamPermissionsResponse>}
|
|
215
|
+
*
|
|
216
|
+
* @see [Topics: testIamPermissions API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/testIamPermissions}
|
|
217
|
+
* @see [Subscriptions: testIamPermissions API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/testIamPermissions}
|
|
218
|
+
* @see [Permissions Reference]{@link https://cloud.google.com/pubsub/access_control#permissions}
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```
|
|
222
|
+
* const {PubSub} = require('@google-cloud/pubsub');
|
|
223
|
+
* const pubsub = new PubSub();
|
|
224
|
+
*
|
|
225
|
+
* const topic = pubsub.topic('my-topic');
|
|
226
|
+
* const subscription = topic.subscription('my-subscription');
|
|
227
|
+
*
|
|
228
|
+
* //-
|
|
229
|
+
* // Test a single permission.
|
|
230
|
+
* //-
|
|
231
|
+
* const test = 'pubsub.topics.update';
|
|
232
|
+
*
|
|
233
|
+
* topic.iam.testPermissions(test, function(err, permissions, apiResponse) {
|
|
234
|
+
* console.log(permissions);
|
|
235
|
+
* // {
|
|
236
|
+
* // "pubsub.topics.update": true
|
|
237
|
+
* // }
|
|
238
|
+
* });
|
|
239
|
+
*
|
|
240
|
+
* //-
|
|
241
|
+
* // Test several permissions at once.
|
|
242
|
+
* //-
|
|
243
|
+
* const tests = [
|
|
244
|
+
* 'pubsub.subscriptions.consume',
|
|
245
|
+
* 'pubsub.subscriptions.update'
|
|
246
|
+
* ];
|
|
247
|
+
*
|
|
248
|
+
* subscription.iam.testPermissions(tests, function(err, permissions) {
|
|
249
|
+
* console.log(permissions);
|
|
250
|
+
* // {
|
|
251
|
+
* // "pubsub.subscriptions.consume": true,
|
|
252
|
+
* // "pubsub.subscriptions.update": false
|
|
253
|
+
* // }
|
|
254
|
+
* });
|
|
255
|
+
*
|
|
256
|
+
* //-
|
|
257
|
+
* // If the callback is omitted, we'll return a Promise.
|
|
258
|
+
* //-
|
|
259
|
+
* topic.iam.testPermissions(test).then(function(data) {
|
|
260
|
+
* const permissions = data[0];
|
|
261
|
+
* const apiResponse = data[1];
|
|
262
|
+
* });
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
85
265
|
testPermissions(permissions: string | string[], gaxOpts?: CallOptions): Promise<TestIamPermissionsResponse>;
|
|
86
266
|
testPermissions(permissions: string | string[], gaxOpts: CallOptions, callback: TestIamPermissionsCallback): void;
|
|
87
267
|
testPermissions(permissions: string | string[], callback: TestIamPermissionsCallback): void;
|
package/build/src/iam.js
CHANGED
|
@@ -50,6 +50,7 @@ const util_1 = require("./util");
|
|
|
50
50
|
* @see [What is Cloud IAM?]{@link https://cloud.google.com/iam/}
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
|
+
* ```
|
|
53
54
|
* const {PubSub} = require('@google-cloud/pubsub');
|
|
54
55
|
* const pubsub = new PubSub();
|
|
55
56
|
*
|
|
@@ -58,6 +59,7 @@ const util_1 = require("./util");
|
|
|
58
59
|
*
|
|
59
60
|
* const subscription = pubsub.subscription('my-subscription');
|
|
60
61
|
* // subscription.iam
|
|
62
|
+
* ```
|
|
61
63
|
*/
|
|
62
64
|
class IAM {
|
|
63
65
|
constructor(pubsub, id) {
|
|
@@ -65,45 +67,6 @@ class IAM {
|
|
|
65
67
|
this.request = pubsub.request.bind(pubsub);
|
|
66
68
|
this.id = id;
|
|
67
69
|
}
|
|
68
|
-
/**
|
|
69
|
-
* @typedef {array} GetPolicyResponse
|
|
70
|
-
* @property {object} 0 The policy.
|
|
71
|
-
*/
|
|
72
|
-
/**
|
|
73
|
-
* @callback GetPolicyCallback
|
|
74
|
-
* @param {?Error} err Request error, if any.
|
|
75
|
-
* @param {object} acl The policy.
|
|
76
|
-
*/
|
|
77
|
-
/**
|
|
78
|
-
* Get the IAM policy
|
|
79
|
-
*
|
|
80
|
-
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
81
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
82
|
-
* @param {GetPolicyCallback} [callback] Callback function.
|
|
83
|
-
* @returns {Promise<GetPolicyResponse>}
|
|
84
|
-
*
|
|
85
|
-
* @see [Topics: getIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/getIamPolicy}
|
|
86
|
-
* @see [Subscriptions: getIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/getIamPolicy}
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
90
|
-
* const pubsub = new PubSub();
|
|
91
|
-
*
|
|
92
|
-
* const topic = pubsub.topic('my-topic');
|
|
93
|
-
* const subscription = topic.subscription('my-subscription');
|
|
94
|
-
*
|
|
95
|
-
* topic.iam.getPolicy(function(err, policy, apiResponse) {});
|
|
96
|
-
*
|
|
97
|
-
* subscription.iam.getPolicy(function(err, policy, apiResponse) {});
|
|
98
|
-
*
|
|
99
|
-
* //-
|
|
100
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
101
|
-
* //-
|
|
102
|
-
* topic.iam.getPolicy().then(function(data) {
|
|
103
|
-
* const policy = data[0];
|
|
104
|
-
* const apiResponse = data[1];
|
|
105
|
-
* });
|
|
106
|
-
*/
|
|
107
70
|
getPolicy(optsOrCallback, callback) {
|
|
108
71
|
const gaxOpts = typeof optsOrCallback === 'object' ? optsOrCallback : {};
|
|
109
72
|
callback = typeof optsOrCallback === 'function' ? optsOrCallback : callback;
|
|
@@ -117,63 +80,6 @@ class IAM {
|
|
|
117
80
|
gaxOpts,
|
|
118
81
|
}, callback);
|
|
119
82
|
}
|
|
120
|
-
/**
|
|
121
|
-
* @typedef {array} SetPolicyResponse
|
|
122
|
-
* @property {object} 0 The policy.
|
|
123
|
-
*/
|
|
124
|
-
/**
|
|
125
|
-
* @callback SetPolicyCallback
|
|
126
|
-
* @param {?Error} err Request error, if any.
|
|
127
|
-
* @param {object} acl The policy.
|
|
128
|
-
*/
|
|
129
|
-
/**
|
|
130
|
-
* Set the IAM policy
|
|
131
|
-
*
|
|
132
|
-
* @throws {Error} If no policy is provided.
|
|
133
|
-
*
|
|
134
|
-
* @param {object} policy The [policy](https://cloud.google.com/pubsub/docs/reference/rest/v1/Policy).
|
|
135
|
-
* @param {array} [policy.bindings] Bindings associate members with roles.
|
|
136
|
-
* @param {Array<object>} [policy.rules] Rules to be applied to the policy.
|
|
137
|
-
* @param {string} [policy.etag] Etags are used to perform a read-modify-write.
|
|
138
|
-
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
139
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
140
|
-
* @param {SetPolicyCallback} callback Callback function.
|
|
141
|
-
* @returns {Promise<SetPolicyResponse>}
|
|
142
|
-
*
|
|
143
|
-
* @see [Topics: setIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/setIamPolicy}
|
|
144
|
-
* @see [Subscriptions: setIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/setIamPolicy}
|
|
145
|
-
* @see [Policy]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/Policy}
|
|
146
|
-
*
|
|
147
|
-
* @example
|
|
148
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
149
|
-
* const pubsub = new PubSub();
|
|
150
|
-
*
|
|
151
|
-
* const topic = pubsub.topic('my-topic');
|
|
152
|
-
* const subscription = topic.subscription('my-subscription');
|
|
153
|
-
*
|
|
154
|
-
* const myPolicy = {
|
|
155
|
-
* bindings: [
|
|
156
|
-
* {
|
|
157
|
-
* role: 'roles/pubsub.subscriber',
|
|
158
|
-
* members:
|
|
159
|
-
* ['serviceAccount:myotherproject@appspot.gserviceaccount.com']
|
|
160
|
-
* }
|
|
161
|
-
* ]
|
|
162
|
-
* };
|
|
163
|
-
*
|
|
164
|
-
* topic.iam.setPolicy(myPolicy, function(err, policy, apiResponse) {});
|
|
165
|
-
*
|
|
166
|
-
* subscription.iam.setPolicy(myPolicy, function(err, policy, apiResponse)
|
|
167
|
-
* {});
|
|
168
|
-
*
|
|
169
|
-
* //-
|
|
170
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
171
|
-
* //-
|
|
172
|
-
* topic.iam.setPolicy(myPolicy).then(function(data) {
|
|
173
|
-
* const policy = data[0];
|
|
174
|
-
* const apiResponse = data[1];
|
|
175
|
-
* });
|
|
176
|
-
*/
|
|
177
83
|
setPolicy(policy, optsOrCallback, callback) {
|
|
178
84
|
if (!(typeof policy === 'object')) {
|
|
179
85
|
throw new Error('A policy object is required.');
|
|
@@ -191,82 +97,6 @@ class IAM {
|
|
|
191
97
|
gaxOpts,
|
|
192
98
|
}, callback);
|
|
193
99
|
}
|
|
194
|
-
/**
|
|
195
|
-
* @callback TestIamPermissionsCallback
|
|
196
|
-
* @param {?Error} err Request error, if any.
|
|
197
|
-
* @param {TestIamPermissionsAPIResponse} permissions A subset of permissions that the caller is allowed.
|
|
198
|
-
* @param {PermissionsResponse} apiResponse The full API response.
|
|
199
|
-
*/
|
|
200
|
-
/**
|
|
201
|
-
* @typedef {array} TestIamPermissionsResponse
|
|
202
|
-
* @property {object[]} 0 A subset of permissions that the caller is allowed.
|
|
203
|
-
* @property {PermissionsResponse} 1 The full API response.
|
|
204
|
-
*/
|
|
205
|
-
/**
|
|
206
|
-
* @typedef {string[]} PermissionsResponse
|
|
207
|
-
* A subset of TestPermissionsRequest.permissions that the caller is allowed.
|
|
208
|
-
* @see https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#google.iam.v1.TestIamPermissionsRequest
|
|
209
|
-
*/
|
|
210
|
-
/**
|
|
211
|
-
* Test a set of permissions for a resource.
|
|
212
|
-
*
|
|
213
|
-
* Permissions with wildcards such as `*` or `storage.*` are not allowed.
|
|
214
|
-
*
|
|
215
|
-
* @throws {Error} If permissions are not provided.
|
|
216
|
-
*
|
|
217
|
-
* @param {string|string[]} permissions The permission(s) to test for.
|
|
218
|
-
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
219
|
-
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
220
|
-
* @param {TestIamPermissionsCallback} [callback] Callback function.
|
|
221
|
-
* @returns {Promise<TestIamPermissionsResponse>}
|
|
222
|
-
*
|
|
223
|
-
* @see [Topics: testIamPermissions API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/testIamPermissions}
|
|
224
|
-
* @see [Subscriptions: testIamPermissions API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/testIamPermissions}
|
|
225
|
-
* @see [Permissions Reference]{@link https://cloud.google.com/pubsub/access_control#permissions}
|
|
226
|
-
*
|
|
227
|
-
* @example
|
|
228
|
-
* const {PubSub} = require('@google-cloud/pubsub');
|
|
229
|
-
* const pubsub = new PubSub();
|
|
230
|
-
*
|
|
231
|
-
* const topic = pubsub.topic('my-topic');
|
|
232
|
-
* const subscription = topic.subscription('my-subscription');
|
|
233
|
-
*
|
|
234
|
-
* //-
|
|
235
|
-
* // Test a single permission.
|
|
236
|
-
* //-
|
|
237
|
-
* const test = 'pubsub.topics.update';
|
|
238
|
-
*
|
|
239
|
-
* topic.iam.testPermissions(test, function(err, permissions, apiResponse) {
|
|
240
|
-
* console.log(permissions);
|
|
241
|
-
* // {
|
|
242
|
-
* // "pubsub.topics.update": true
|
|
243
|
-
* // }
|
|
244
|
-
* });
|
|
245
|
-
*
|
|
246
|
-
* //-
|
|
247
|
-
* // Test several permissions at once.
|
|
248
|
-
* //-
|
|
249
|
-
* const tests = [
|
|
250
|
-
* 'pubsub.subscriptions.consume',
|
|
251
|
-
* 'pubsub.subscriptions.update'
|
|
252
|
-
* ];
|
|
253
|
-
*
|
|
254
|
-
* subscription.iam.testPermissions(tests, function(err, permissions) {
|
|
255
|
-
* console.log(permissions);
|
|
256
|
-
* // {
|
|
257
|
-
* // "pubsub.subscriptions.consume": true,
|
|
258
|
-
* // "pubsub.subscriptions.update": false
|
|
259
|
-
* // }
|
|
260
|
-
* });
|
|
261
|
-
*
|
|
262
|
-
* //-
|
|
263
|
-
* // If the callback is omitted, we'll return a Promise.
|
|
264
|
-
* //-
|
|
265
|
-
* topic.iam.testPermissions(test).then(function(data) {
|
|
266
|
-
* const permissions = data[0];
|
|
267
|
-
* const apiResponse = data[1];
|
|
268
|
-
* });
|
|
269
|
-
*/
|
|
270
100
|
testPermissions(permissions, optsOrCallback, callback) {
|
|
271
101
|
if (!Array.isArray(permissions) && !(typeof permissions === 'string')) {
|
|
272
102
|
throw new Error('Permissions are required.');
|
package/build/src/iam.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iam.js","sourceRoot":"","sources":["../../src/iam.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AAEH,iCAAkC;AAMlC,iCAAqC;AA8BrC
|
|
1
|
+
{"version":3,"file":"iam.js","sourceRoot":"","sources":["../../src/iam.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AAEH,iCAAkC;AAMlC,iCAAqC;AA8BrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAa,GAAG;IAKd,YAAY,MAAc,EAAE,EAAU;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG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,WAAW;IACX,iBAAiB;CAClB,CAAC,CAAC"}
|
package/build/src/index.d.ts
CHANGED
|
@@ -29,21 +29,29 @@
|
|
|
29
29
|
* @module {PubSub} @google-cloud/pubsub
|
|
30
30
|
* @alias nodejs-pubsub
|
|
31
31
|
*
|
|
32
|
-
* @example
|
|
32
|
+
* @example Install the client library with <a href="https://www.npmjs.com/">npm</a>:
|
|
33
|
+
* ```
|
|
33
34
|
* npm install @google-cloud/pubsub
|
|
34
35
|
*
|
|
35
|
-
*
|
|
36
|
+
* ```
|
|
37
|
+
* @example Import the client library
|
|
38
|
+
* ```
|
|
36
39
|
* const {PubSub} = require('@google-cloud/pubsub');
|
|
37
40
|
*
|
|
38
|
-
*
|
|
41
|
+
* ```
|
|
42
|
+
* @example Create a client that uses <a href="https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application">Application Default Credentials (ADC)</a>:
|
|
43
|
+
* ```
|
|
39
44
|
* const pubsub = new PubSub();
|
|
40
45
|
*
|
|
41
|
-
*
|
|
46
|
+
* ```
|
|
47
|
+
* @example Create a client with <a href="https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually">explicit credentials</a>:
|
|
48
|
+
* ```
|
|
42
49
|
* const pubsub = new PubSub({
|
|
43
50
|
* projectId: 'your-project-id',
|
|
44
51
|
* keyFilename: '/path/to/keyfile.json'
|
|
45
52
|
* });
|
|
46
53
|
*
|
|
54
|
+
* ```
|
|
47
55
|
* @example <caption>include:samples/quickstart.js</caption>
|
|
48
56
|
* region_tag:pubsub_quickstart_create_topic
|
|
49
57
|
* Full quickstart example:
|
package/build/src/index.js
CHANGED
|
@@ -32,21 +32,29 @@ exports.protos = exports.v1 = void 0;
|
|
|
32
32
|
* @module {PubSub} @google-cloud/pubsub
|
|
33
33
|
* @alias nodejs-pubsub
|
|
34
34
|
*
|
|
35
|
-
* @example
|
|
35
|
+
* @example Install the client library with <a href="https://www.npmjs.com/">npm</a>:
|
|
36
|
+
* ```
|
|
36
37
|
* npm install @google-cloud/pubsub
|
|
37
38
|
*
|
|
38
|
-
*
|
|
39
|
+
* ```
|
|
40
|
+
* @example Import the client library
|
|
41
|
+
* ```
|
|
39
42
|
* const {PubSub} = require('@google-cloud/pubsub');
|
|
40
43
|
*
|
|
41
|
-
*
|
|
44
|
+
* ```
|
|
45
|
+
* @example Create a client that uses <a href="https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application">Application Default Credentials (ADC)</a>:
|
|
46
|
+
* ```
|
|
42
47
|
* const pubsub = new PubSub();
|
|
43
48
|
*
|
|
44
|
-
*
|
|
49
|
+
* ```
|
|
50
|
+
* @example Create a client with <a href="https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually">explicit credentials</a>:
|
|
51
|
+
* ```
|
|
45
52
|
* const pubsub = new PubSub({
|
|
46
53
|
* projectId: 'your-project-id',
|
|
47
54
|
* keyFilename: '/path/to/keyfile.json'
|
|
48
55
|
* });
|
|
49
56
|
*
|
|
57
|
+
* ```
|
|
50
58
|
* @example <caption>include:samples/quickstart.js</caption>
|
|
51
59
|
* region_tag:pubsub_quickstart_create_topic
|
|
52
60
|
* Full quickstart example:
|
package/build/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AACH;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AACH;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;GAWG;AACH,2BAA2B;AACnB,gBAAE;AAEV,6BAUe;AADb,0FAAA,GAAG,OAAA;AAIL,2DAAuD;AAA/C,6GAAA,YAAY,OAAA;AAEpB,mCAckB;AAFhB,gGAAA,MAAM,OAAA;AAGR,uCAMoB;AADlB,oGAAA,QAAQ,OAAA;AAEV,2CAAwD;AAAhD,qGAAA,OAAO,OAAA;AACf,mCAYkB;AAXhB,gGAAA,MAAM,OAAA;AAIN,qGAAA,WAAW,OAAA;AAIX,qGAAA,WAAW,OAAA;AACX,mGAAA,SAAS,OAAA;AAGX,+CAgBwB;AADtB,4GAAA,YAAY,OAAA;AAEd,iCAciB;AAFf,8FAAA,KAAK,OAAA;AAIP,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE;IAC1B,OAAO,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC;IACxC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACxB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;CAC/C;AACD,2CAA2C;AACnC,wBAAM"}
|
|
@@ -19,8 +19,10 @@ import { Message, Subscriber } from './subscriber';
|
|
|
19
19
|
export interface FlowControlOptions {
|
|
20
20
|
allowExcessMessages?: boolean;
|
|
21
21
|
maxBytes?: number;
|
|
22
|
-
maxExtension?: number;
|
|
23
22
|
maxMessages?: number;
|
|
23
|
+
maxExtensionMinutes?: number;
|
|
24
|
+
/** @deprecated Use maxExtensionMinutes. */
|
|
25
|
+
maxExtension?: number;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* @typedef {object} FlowControlOptions
|
|
@@ -33,7 +35,7 @@ export interface FlowControlOptions {
|
|
|
33
35
|
* @property {number} [maxBytes=104857600] The desired amount of memory to
|
|
34
36
|
* allow message data to consume. (Default: 100MB) It's possible that this
|
|
35
37
|
* value will be exceeded, since messages are received in batches.
|
|
36
|
-
* @property {number} [
|
|
38
|
+
* @property {number} [maxExtensionMinutes=60] The maximum duration (in minutes)
|
|
37
39
|
* to extend the message deadline before redelivering.
|
|
38
40
|
* @property {number} [maxMessages=1000] The desired number of messages to allow
|
|
39
41
|
* in memory before pausing the message stream. Unless allowExcessMessages
|
|
@@ -104,6 +106,9 @@ export declare class LeaseManager extends EventEmitter {
|
|
|
104
106
|
* Sets options for the LeaseManager.
|
|
105
107
|
*
|
|
106
108
|
* @param {FlowControlOptions} [options] The options.
|
|
109
|
+
*
|
|
110
|
+
* @throws {RangeError} If both maxExtension and maxExtensionMinutes are set.
|
|
111
|
+
*
|
|
107
112
|
* @private
|
|
108
113
|
*/
|
|
109
114
|
setOptions(options: FlowControlOptions): void;
|
|
@@ -29,7 +29,7 @@ const default_options_1 = require("./default-options");
|
|
|
29
29
|
* @property {number} [maxBytes=104857600] The desired amount of memory to
|
|
30
30
|
* allow message data to consume. (Default: 100MB) It's possible that this
|
|
31
31
|
* value will be exceeded, since messages are received in batches.
|
|
32
|
-
* @property {number} [
|
|
32
|
+
* @property {number} [maxExtensionMinutes=60] The maximum duration (in minutes)
|
|
33
33
|
* to extend the message deadline before redelivering.
|
|
34
34
|
* @property {number} [maxMessages=1000] The desired number of messages to allow
|
|
35
35
|
* in memory before pausing the message stream. Unless allowExcessMessages
|
|
@@ -155,13 +155,27 @@ class LeaseManager extends events_1.EventEmitter {
|
|
|
155
155
|
* Sets options for the LeaseManager.
|
|
156
156
|
*
|
|
157
157
|
* @param {FlowControlOptions} [options] The options.
|
|
158
|
+
*
|
|
159
|
+
* @throws {RangeError} If both maxExtension and maxExtensionMinutes are set.
|
|
160
|
+
*
|
|
158
161
|
* @private
|
|
159
162
|
*/
|
|
160
163
|
setOptions(options) {
|
|
164
|
+
// Convert the old deprecated maxExtension to avoid breaking clients,
|
|
165
|
+
// but allow only one.
|
|
166
|
+
if (options.maxExtension !== undefined &&
|
|
167
|
+
options.maxExtensionMinutes !== undefined) {
|
|
168
|
+
throw new RangeError('Only one of "maxExtension" or "maxExtensionMinutes" may be set for subscriber lease management options');
|
|
169
|
+
}
|
|
170
|
+
if (options.maxExtension !== undefined &&
|
|
171
|
+
options.maxExtensionMinutes === undefined) {
|
|
172
|
+
options.maxExtensionMinutes = options.maxExtension / 60;
|
|
173
|
+
delete options.maxExtension;
|
|
174
|
+
}
|
|
161
175
|
const defaults = {
|
|
162
176
|
allowExcessMessages: true,
|
|
163
177
|
maxBytes: default_options_1.defaultOptions.subscription.maxOutstandingBytes,
|
|
164
|
-
|
|
178
|
+
maxExtensionMinutes: default_options_1.defaultOptions.subscription.maxExtensionMinutes,
|
|
165
179
|
maxMessages: default_options_1.defaultOptions.subscription.maxOutstandingMessages,
|
|
166
180
|
};
|
|
167
181
|
this._options = Object.assign(defaults, options);
|
|
@@ -202,8 +216,9 @@ class LeaseManager extends events_1.EventEmitter {
|
|
|
202
216
|
_extendDeadlines() {
|
|
203
217
|
const deadline = this._subscriber.ackDeadline;
|
|
204
218
|
for (const message of this._messages) {
|
|
205
|
-
|
|
206
|
-
|
|
219
|
+
// Lifespan here is in minutes.
|
|
220
|
+
const lifespan = (Date.now() - message.received) / (60 * 1000);
|
|
221
|
+
if (lifespan < this._options.maxExtensionMinutes) {
|
|
207
222
|
message.modAck(deadline);
|
|
208
223
|
}
|
|
209
224
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lease-manager.js","sourceRoot":"","sources":["../../src/lease-manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,mCAAoC;AAEpC,uDAAiD;
|
|
1
|
+
{"version":3,"file":"lease-manager.js","sourceRoot":"","sources":["../../src/lease-manager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,mCAAoC;AAEpC,uDAAiD;AAYjD;;;;;;;;;;;;;;;;;;GAkBG;AACH;;;;;;;;;GASG;AACH,MAAa,YAAa,SAAQ,qBAAY;IAQ5C,YAAY,GAAe,EAAE,OAAO,GAAG,EAAE;QACvC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;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