google-cloud-pubsub-v1 0.4.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/pubsub/v1/iam_policy/client.rb +39 -40
- data/lib/google/cloud/pubsub/v1/publisher/client.rb +76 -83
- data/lib/google/cloud/pubsub/v1/schema_service/client.rb +48 -43
- data/lib/google/cloud/pubsub/v1/subscriber/client.rb +97 -119
- data/lib/google/cloud/pubsub/v1/version.rb +1 -1
- data/lib/google/pubsub/v1/pubsub_pb.rb +7 -0
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +2 -2
- data/lib/google/pubsub/v1/schema_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/pubsub/v1/pubsub.rb +33 -2
- data/proto_docs/google/pubsub/v1/schema.rb +2 -0
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +4 -5
- data/lib/google/iam/v1/iam_policy_services_pb.rb +0 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 441674812241a0cdd2bfe5571966a5f9893f9f247868b13858e854809d2def9b
|
4
|
+
data.tar.gz: 0b1c9adfc174e0a0ced3341c79d8de58e47501347d1295427b2b13a395c59d99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 892d5ae726abd72028e2915d1d54397afe410bd61fe596edfa06c8ec9e56770dd1be1b3105c6526c1cd34490da2364568083d24650d3f53451efb7b90594aeef
|
7
|
+
data.tar.gz: bc38b3afe7a0324650f14816feac655604d375018b53e8ba0667cef087aae86adb390b518c7b40a2f07ee318aa3762bba58771af08d550e6dcd813a8a1e28151
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-pubsub-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::PubSub::V1::SchemaService::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `PUBSUB_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `PUBSUB_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/pubsub/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/pubsub/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/pubsub/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/pubsub/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::PubSub::V1::SchemaService::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::PubSub::V1::CreateSchemaRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.create_schema request
|
38
38
|
```
|
39
39
|
|
@@ -63,13 +63,12 @@ module Google
|
|
63
63
|
# See {::Google::Cloud::PubSub::V1::IAMPolicy::Client::Configuration}
|
64
64
|
# for a description of the configuration fields.
|
65
65
|
#
|
66
|
-
#
|
66
|
+
# @example
|
67
67
|
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
# end
|
68
|
+
# # Modify the configuration for all IAMPolicy clients
|
69
|
+
# ::Google::Cloud::PubSub::V1::IAMPolicy::Client.configure do |config|
|
70
|
+
# config.timeout = 10.0
|
71
|
+
# end
|
73
72
|
#
|
74
73
|
# @yield [config] Configure the Client client.
|
75
74
|
# @yieldparam config [Client::Configuration]
|
@@ -116,19 +115,15 @@ module Google
|
|
116
115
|
##
|
117
116
|
# Create a new IAMPolicy client object.
|
118
117
|
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
# To create a new IAMPolicy client with the default
|
122
|
-
# configuration:
|
123
|
-
#
|
124
|
-
# client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
118
|
+
# @example
|
125
119
|
#
|
126
|
-
#
|
127
|
-
#
|
120
|
+
# # Create a client using the default configuration
|
121
|
+
# client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new
|
128
122
|
#
|
129
|
-
#
|
130
|
-
#
|
131
|
-
#
|
123
|
+
# # Create a client using a custom configuration
|
124
|
+
# client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new do |config|
|
125
|
+
# config.timeout = 10.0
|
126
|
+
# end
|
132
127
|
#
|
133
128
|
# @yield [config] Configure the IAMPolicy client.
|
134
129
|
# @yieldparam config [Client::Configuration]
|
@@ -148,14 +143,13 @@ module Google
|
|
148
143
|
|
149
144
|
# Create credentials
|
150
145
|
credentials = @config.credentials
|
151
|
-
# Use self-signed JWT if the
|
146
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
152
147
|
# but only if the default endpoint does not have a region prefix.
|
153
|
-
enable_self_signed_jwt = @config.
|
154
|
-
@config.endpoint == Client.configure.endpoint &&
|
148
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
155
149
|
!@config.endpoint.split(".").first.include?("-")
|
156
150
|
credentials ||= Credentials.default scope: @config.scope,
|
157
151
|
enable_self_signed_jwt: enable_self_signed_jwt
|
158
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
152
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
159
153
|
credentials = Credentials.new credentials, scope: @config.scope
|
160
154
|
end
|
161
155
|
@quota_project_id = @config.quota_project
|
@@ -234,7 +228,9 @@ module Google
|
|
234
228
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
235
229
|
metadata: metadata,
|
236
230
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
237
|
-
|
231
|
+
|
232
|
+
options.apply_defaults timeout: @config.timeout,
|
233
|
+
metadata: @config.metadata,
|
238
234
|
retry_policy: @config.retry_policy
|
239
235
|
|
240
236
|
@iam_policy_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -306,7 +302,9 @@ module Google
|
|
306
302
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
307
303
|
metadata: metadata,
|
308
304
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
309
|
-
|
305
|
+
|
306
|
+
options.apply_defaults timeout: @config.timeout,
|
307
|
+
metadata: @config.metadata,
|
310
308
|
retry_policy: @config.retry_policy
|
311
309
|
|
312
310
|
@iam_policy_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -384,7 +382,9 @@ module Google
|
|
384
382
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
385
383
|
metadata: metadata,
|
386
384
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
387
|
-
|
385
|
+
|
386
|
+
options.apply_defaults timeout: @config.timeout,
|
387
|
+
metadata: @config.metadata,
|
388
388
|
retry_policy: @config.retry_policy
|
389
389
|
|
390
390
|
@iam_policy_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -408,22 +408,21 @@ module Google
|
|
408
408
|
# Configuration can be applied globally to all clients, or to a single client
|
409
409
|
# on construction.
|
410
410
|
#
|
411
|
-
#
|
412
|
-
#
|
413
|
-
#
|
414
|
-
# to 20 seconds,
|
415
|
-
#
|
416
|
-
#
|
417
|
-
#
|
418
|
-
#
|
419
|
-
#
|
420
|
-
#
|
421
|
-
#
|
422
|
-
#
|
423
|
-
#
|
424
|
-
#
|
425
|
-
#
|
426
|
-
# end
|
411
|
+
# @example
|
412
|
+
#
|
413
|
+
# # Modify the global config, setting the timeout for
|
414
|
+
# # set_iam_policy to 20 seconds,
|
415
|
+
# # and all remaining timeouts to 10 seconds.
|
416
|
+
# ::Google::Cloud::PubSub::V1::IAMPolicy::Client.configure do |config|
|
417
|
+
# config.timeout = 10.0
|
418
|
+
# config.rpcs.set_iam_policy.timeout = 20.0
|
419
|
+
# end
|
420
|
+
#
|
421
|
+
# # Apply the above configuration only to a new client.
|
422
|
+
# client = ::Google::Cloud::PubSub::V1::IAMPolicy::Client.new do |config|
|
423
|
+
# config.timeout = 10.0
|
424
|
+
# config.rpcs.set_iam_policy.timeout = 20.0
|
425
|
+
# end
|
427
426
|
#
|
428
427
|
# @!attribute [rw] endpoint
|
429
428
|
# The hostname or hostname:port of the service endpoint.
|
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::PubSub::V1::Publisher::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all Publisher clients
|
48
|
+
# ::Google::Cloud::PubSub::V1::Publisher::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -68,74 +67,47 @@ module Google
|
|
68
67
|
|
69
68
|
default_config.rpcs.create_topic.timeout = 60.0
|
70
69
|
default_config.rpcs.create_topic.retry_policy = {
|
71
|
-
initial_delay: 0.1,
|
72
|
-
max_delay: 60.0,
|
73
|
-
multiplier: 1.3,
|
74
|
-
retry_codes: [14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
75
71
|
}
|
76
72
|
|
77
73
|
default_config.rpcs.update_topic.timeout = 60.0
|
78
74
|
default_config.rpcs.update_topic.retry_policy = {
|
79
|
-
initial_delay: 0.1,
|
80
|
-
max_delay: 60.0,
|
81
|
-
multiplier: 1.3,
|
82
|
-
retry_codes: [14]
|
75
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
83
76
|
}
|
84
77
|
|
85
78
|
default_config.rpcs.publish.timeout = 60.0
|
86
79
|
default_config.rpcs.publish.retry_policy = {
|
87
|
-
initial_delay: 0.1,
|
88
|
-
max_delay: 60.0,
|
89
|
-
multiplier: 1.3,
|
90
|
-
retry_codes: [10, 1, 13, 8, 2, 14, 4]
|
80
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [10, 1, 13, 8, 2, 14, 4]
|
91
81
|
}
|
92
82
|
|
93
83
|
default_config.rpcs.get_topic.timeout = 60.0
|
94
84
|
default_config.rpcs.get_topic.retry_policy = {
|
95
|
-
initial_delay: 0.1,
|
96
|
-
max_delay: 60.0,
|
97
|
-
multiplier: 1.3,
|
98
|
-
retry_codes: [2, 10, 14]
|
85
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
|
99
86
|
}
|
100
87
|
|
101
88
|
default_config.rpcs.list_topics.timeout = 60.0
|
102
89
|
default_config.rpcs.list_topics.retry_policy = {
|
103
|
-
initial_delay: 0.1,
|
104
|
-
max_delay: 60.0,
|
105
|
-
multiplier: 1.3,
|
106
|
-
retry_codes: [2, 10, 14]
|
90
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
|
107
91
|
}
|
108
92
|
|
109
93
|
default_config.rpcs.list_topic_subscriptions.timeout = 60.0
|
110
94
|
default_config.rpcs.list_topic_subscriptions.retry_policy = {
|
111
|
-
initial_delay: 0.1,
|
112
|
-
max_delay: 60.0,
|
113
|
-
multiplier: 1.3,
|
114
|
-
retry_codes: [2, 10, 14]
|
95
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
|
115
96
|
}
|
116
97
|
|
117
98
|
default_config.rpcs.list_topic_snapshots.timeout = 60.0
|
118
99
|
default_config.rpcs.list_topic_snapshots.retry_policy = {
|
119
|
-
initial_delay: 0.1,
|
120
|
-
max_delay: 60.0,
|
121
|
-
multiplier: 1.3,
|
122
|
-
retry_codes: [2, 10, 14]
|
100
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [2, 10, 14]
|
123
101
|
}
|
124
102
|
|
125
103
|
default_config.rpcs.delete_topic.timeout = 60.0
|
126
104
|
default_config.rpcs.delete_topic.retry_policy = {
|
127
|
-
initial_delay: 0.1,
|
128
|
-
max_delay: 60.0,
|
129
|
-
multiplier: 1.3,
|
130
|
-
retry_codes: [14]
|
105
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
131
106
|
}
|
132
107
|
|
133
108
|
default_config.rpcs.detach_subscription.timeout = 60.0
|
134
109
|
default_config.rpcs.detach_subscription.retry_policy = {
|
135
|
-
initial_delay: 0.1,
|
136
|
-
max_delay: 60.0,
|
137
|
-
multiplier: 1.3,
|
138
|
-
retry_codes: [14]
|
110
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
139
111
|
}
|
140
112
|
|
141
113
|
default_config
|
@@ -167,19 +139,15 @@ module Google
|
|
167
139
|
##
|
168
140
|
# Create a new Publisher client object.
|
169
141
|
#
|
170
|
-
#
|
171
|
-
#
|
172
|
-
# To create a new Publisher client with the default
|
173
|
-
# configuration:
|
142
|
+
# @example
|
174
143
|
#
|
175
|
-
#
|
144
|
+
# # Create a client using the default configuration
|
145
|
+
# client = ::Google::Cloud::PubSub::V1::Publisher::Client.new
|
176
146
|
#
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
# config.timeout = 10.0
|
182
|
-
# end
|
147
|
+
# # Create a client using a custom configuration
|
148
|
+
# client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config|
|
149
|
+
# config.timeout = 10.0
|
150
|
+
# end
|
183
151
|
#
|
184
152
|
# @yield [config] Configure the Publisher client.
|
185
153
|
# @yieldparam config [Client::Configuration]
|
@@ -199,14 +167,13 @@ module Google
|
|
199
167
|
|
200
168
|
# Create credentials
|
201
169
|
credentials = @config.credentials
|
202
|
-
# Use self-signed JWT if the
|
170
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
203
171
|
# but only if the default endpoint does not have a region prefix.
|
204
|
-
enable_self_signed_jwt = @config.
|
205
|
-
@config.endpoint == Client.configure.endpoint &&
|
172
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
206
173
|
!@config.endpoint.split(".").first.include?("-")
|
207
174
|
credentials ||= Credentials.default scope: @config.scope,
|
208
175
|
enable_self_signed_jwt: enable_self_signed_jwt
|
209
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
176
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
210
177
|
credentials = Credentials.new credentials, scope: @config.scope
|
211
178
|
end
|
212
179
|
@quota_project_id = @config.quota_project
|
@@ -237,7 +204,7 @@ module Google
|
|
237
204
|
# @param options [::Gapic::CallOptions, ::Hash]
|
238
205
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
239
206
|
#
|
240
|
-
# @overload create_topic(name: nil, labels: nil, message_storage_policy: nil, kms_key_name: nil, schema_settings: nil, satisfies_pzs: nil)
|
207
|
+
# @overload create_topic(name: nil, labels: nil, message_storage_policy: nil, kms_key_name: nil, schema_settings: nil, satisfies_pzs: nil, message_retention_duration: nil)
|
241
208
|
# Pass arguments to `create_topic` via keyword arguments. Note that at
|
242
209
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
243
210
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -266,6 +233,15 @@ module Google
|
|
266
233
|
# @param satisfies_pzs [::Boolean]
|
267
234
|
# Reserved for future use. This field is set only in responses from the
|
268
235
|
# server; it is ignored if it is set in any requests.
|
236
|
+
# @param message_retention_duration [::Google::Protobuf::Duration, ::Hash]
|
237
|
+
# Indicates the minimum duration to retain a message after it is published to
|
238
|
+
# the topic. If this field is set, messages published to the topic in the
|
239
|
+
# last `message_retention_duration` are always available to subscribers. For
|
240
|
+
# instance, it allows any attached subscription to [seek to a
|
241
|
+
# timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
|
242
|
+
# that is up to `message_retention_duration` in the past. If this field is
|
243
|
+
# not set, message retention is controlled by settings on individual
|
244
|
+
# subscriptions. Cannot be more than 7 days or less than 10 minutes.
|
269
245
|
#
|
270
246
|
# @yield [response, operation] Access the result along with the RPC operation
|
271
247
|
# @yieldparam response [::Google::Cloud::PubSub::V1::Topic]
|
@@ -301,7 +277,9 @@ module Google
|
|
301
277
|
options.apply_defaults timeout: @config.rpcs.create_topic.timeout,
|
302
278
|
metadata: metadata,
|
303
279
|
retry_policy: @config.rpcs.create_topic.retry_policy
|
304
|
-
|
280
|
+
|
281
|
+
options.apply_defaults timeout: @config.timeout,
|
282
|
+
metadata: @config.metadata,
|
305
283
|
retry_policy: @config.retry_policy
|
306
284
|
|
307
285
|
@publisher_stub.call_rpc :create_topic, request, options: options do |response, operation|
|
@@ -374,7 +352,9 @@ module Google
|
|
374
352
|
options.apply_defaults timeout: @config.rpcs.update_topic.timeout,
|
375
353
|
metadata: metadata,
|
376
354
|
retry_policy: @config.rpcs.update_topic.retry_policy
|
377
|
-
|
355
|
+
|
356
|
+
options.apply_defaults timeout: @config.timeout,
|
357
|
+
metadata: @config.metadata,
|
378
358
|
retry_policy: @config.retry_policy
|
379
359
|
|
380
360
|
@publisher_stub.call_rpc :update_topic, request, options: options do |response, operation|
|
@@ -444,7 +424,9 @@ module Google
|
|
444
424
|
options.apply_defaults timeout: @config.rpcs.publish.timeout,
|
445
425
|
metadata: metadata,
|
446
426
|
retry_policy: @config.rpcs.publish.retry_policy
|
447
|
-
|
427
|
+
|
428
|
+
options.apply_defaults timeout: @config.timeout,
|
429
|
+
metadata: @config.metadata,
|
448
430
|
retry_policy: @config.retry_policy
|
449
431
|
|
450
432
|
@publisher_stub.call_rpc :publish, request, options: options do |response, operation|
|
@@ -511,7 +493,9 @@ module Google
|
|
511
493
|
options.apply_defaults timeout: @config.rpcs.get_topic.timeout,
|
512
494
|
metadata: metadata,
|
513
495
|
retry_policy: @config.rpcs.get_topic.retry_policy
|
514
|
-
|
496
|
+
|
497
|
+
options.apply_defaults timeout: @config.timeout,
|
498
|
+
metadata: @config.metadata,
|
515
499
|
retry_policy: @config.retry_policy
|
516
500
|
|
517
501
|
@publisher_stub.call_rpc :get_topic, request, options: options do |response, operation|
|
@@ -584,7 +568,9 @@ module Google
|
|
584
568
|
options.apply_defaults timeout: @config.rpcs.list_topics.timeout,
|
585
569
|
metadata: metadata,
|
586
570
|
retry_policy: @config.rpcs.list_topics.retry_policy
|
587
|
-
|
571
|
+
|
572
|
+
options.apply_defaults timeout: @config.timeout,
|
573
|
+
metadata: @config.metadata,
|
588
574
|
retry_policy: @config.retry_policy
|
589
575
|
|
590
576
|
@publisher_stub.call_rpc :list_topics, request, options: options do |response, operation|
|
@@ -658,7 +644,9 @@ module Google
|
|
658
644
|
options.apply_defaults timeout: @config.rpcs.list_topic_subscriptions.timeout,
|
659
645
|
metadata: metadata,
|
660
646
|
retry_policy: @config.rpcs.list_topic_subscriptions.retry_policy
|
661
|
-
|
647
|
+
|
648
|
+
options.apply_defaults timeout: @config.timeout,
|
649
|
+
metadata: @config.metadata,
|
662
650
|
retry_policy: @config.retry_policy
|
663
651
|
|
664
652
|
@publisher_stub.call_rpc :list_topic_subscriptions, request, options: options do |response, operation|
|
@@ -735,7 +723,9 @@ module Google
|
|
735
723
|
options.apply_defaults timeout: @config.rpcs.list_topic_snapshots.timeout,
|
736
724
|
metadata: metadata,
|
737
725
|
retry_policy: @config.rpcs.list_topic_snapshots.retry_policy
|
738
|
-
|
726
|
+
|
727
|
+
options.apply_defaults timeout: @config.timeout,
|
728
|
+
metadata: @config.metadata,
|
739
729
|
retry_policy: @config.retry_policy
|
740
730
|
|
741
731
|
@publisher_stub.call_rpc :list_topic_snapshots, request, options: options do |response, operation|
|
@@ -806,7 +796,9 @@ module Google
|
|
806
796
|
options.apply_defaults timeout: @config.rpcs.delete_topic.timeout,
|
807
797
|
metadata: metadata,
|
808
798
|
retry_policy: @config.rpcs.delete_topic.retry_policy
|
809
|
-
|
799
|
+
|
800
|
+
options.apply_defaults timeout: @config.timeout,
|
801
|
+
metadata: @config.metadata,
|
810
802
|
retry_policy: @config.retry_policy
|
811
803
|
|
812
804
|
@publisher_stub.call_rpc :delete_topic, request, options: options do |response, operation|
|
@@ -876,7 +868,9 @@ module Google
|
|
876
868
|
options.apply_defaults timeout: @config.rpcs.detach_subscription.timeout,
|
877
869
|
metadata: metadata,
|
878
870
|
retry_policy: @config.rpcs.detach_subscription.retry_policy
|
879
|
-
|
871
|
+
|
872
|
+
options.apply_defaults timeout: @config.timeout,
|
873
|
+
metadata: @config.metadata,
|
880
874
|
retry_policy: @config.retry_policy
|
881
875
|
|
882
876
|
@publisher_stub.call_rpc :detach_subscription, request, options: options do |response, operation|
|
@@ -900,22 +894,21 @@ module Google
|
|
900
894
|
# Configuration can be applied globally to all clients, or to a single client
|
901
895
|
# on construction.
|
902
896
|
#
|
903
|
-
#
|
904
|
-
#
|
905
|
-
#
|
906
|
-
# to 20 seconds,
|
907
|
-
#
|
908
|
-
#
|
909
|
-
#
|
910
|
-
#
|
911
|
-
#
|
912
|
-
#
|
913
|
-
#
|
914
|
-
#
|
915
|
-
#
|
916
|
-
#
|
917
|
-
#
|
918
|
-
# end
|
897
|
+
# @example
|
898
|
+
#
|
899
|
+
# # Modify the global config, setting the timeout for
|
900
|
+
# # create_topic to 20 seconds,
|
901
|
+
# # and all remaining timeouts to 10 seconds.
|
902
|
+
# ::Google::Cloud::PubSub::V1::Publisher::Client.configure do |config|
|
903
|
+
# config.timeout = 10.0
|
904
|
+
# config.rpcs.create_topic.timeout = 20.0
|
905
|
+
# end
|
906
|
+
#
|
907
|
+
# # Apply the above configuration only to a new client.
|
908
|
+
# client = ::Google::Cloud::PubSub::V1::Publisher::Client.new do |config|
|
909
|
+
# config.timeout = 10.0
|
910
|
+
# config.rpcs.create_topic.timeout = 20.0
|
911
|
+
# end
|
919
912
|
#
|
920
913
|
# @!attribute [rw] endpoint
|
921
914
|
# The hostname or hostname:port of the service endpoint.
|