google-cloud-pubsub 0.23.2 → 0.24.0
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/pubsub/project.rb +2 -2
- data/lib/google/cloud/pubsub/subscription/list.rb +5 -5
- data/lib/google/cloud/pubsub/topic/list.rb +6 -6
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/duration.rb +6 -0
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/field_mask.rb +53 -1
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +3 -5
- data/lib/google/cloud/pubsub/v1/publisher_client.rb +3 -2
- data/lib/google/cloud/pubsub/v1/publisher_client_config.json +8 -1
- data/lib/google/cloud/pubsub/v1/subscriber_client.rb +6 -5
- data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +12 -3
- data/lib/google/cloud/pubsub/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3e195a29890f73bda2b6a0b6caa90a9c8570454
|
4
|
+
data.tar.gz: 6663923bc7039afc67d791d02215109ca70ac083
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8851ed8c44d1f85bef860c026bfc014726dc2bcf1ca90b6e70fbde6a9c4484e6585bcfe9880821fc783e1ce85b807537c73b3f2c62c97921d4b7717a78459462
|
7
|
+
data.tar.gz: 148697983bbdeb834e4bd261502dd518d0edb104004768f47634fbe68fc2cf0f85f32022cdb4303875c8d8ced2496158cb8a63360f07926fcf6f33800997ee69
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[Google Cloud Pub/Sub](https://cloud.google.com/pubsub/) ([docs](https://cloud.google.com/pubsub/docs/reference/rest/)) is designed to provide reliable, many-to-many, asynchronous messaging between applications. Publisher applications can send messages to a “topic” and other applications can subscribe to that topic to receive the messages. By decoupling senders and receivers, Google Cloud Pub/Sub allows developers to communicate between independently written applications.
|
4
4
|
|
5
|
-
- [google-cloud-pubsub API documentation](http://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-pubsub/
|
5
|
+
- [google-cloud-pubsub API documentation](http://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-pubsub/latest)
|
6
6
|
- [google-cloud-pubsub on RubyGems](https://rubygems.org/gems/[google-cloud-pubsub)
|
7
7
|
- [Google Cloud Pub/Sub documentation](https://cloud.google.com/pubsub/docs)
|
8
8
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
require "google/cloud/errors"
|
17
|
-
require "google/cloud/
|
17
|
+
require "google/cloud/env"
|
18
18
|
require "google/cloud/pubsub/service"
|
19
19
|
require "google/cloud/pubsub/credentials"
|
20
20
|
require "google/cloud/pubsub/topic"
|
@@ -76,7 +76,7 @@ module Google
|
|
76
76
|
ENV["PUBSUB_PROJECT"] ||
|
77
77
|
ENV["GOOGLE_CLOUD_PROJECT"] ||
|
78
78
|
ENV["GCLOUD_PROJECT"] ||
|
79
|
-
Google::Cloud
|
79
|
+
Google::Cloud.env.project_id
|
80
80
|
end
|
81
81
|
|
82
82
|
##
|
@@ -83,15 +83,15 @@ module Google
|
|
83
83
|
end
|
84
84
|
|
85
85
|
##
|
86
|
-
# Retrieves
|
86
|
+
# Retrieves remaining results by repeatedly invoking {#next} until
|
87
87
|
# {#next?} returns `false`. Calls the given block once for each
|
88
|
-
#
|
88
|
+
# result, which is passed as the argument to the block.
|
89
89
|
#
|
90
90
|
# An Enumerator is returned if no block is given.
|
91
91
|
#
|
92
|
-
# This method
|
93
|
-
# retrieved.
|
94
|
-
#
|
92
|
+
# This method will make repeated API calls until all remaining results
|
93
|
+
# are retrieved. (Unlike `#each`, for example, which merely iterates
|
94
|
+
# over the results returned by a single API call.) Use with caution.
|
95
95
|
#
|
96
96
|
# @param [Integer] request_limit The upper limit of API requests to
|
97
97
|
# make to load all subscriptions. Default is no limit.
|
@@ -77,15 +77,15 @@ module Google
|
|
77
77
|
end
|
78
78
|
|
79
79
|
##
|
80
|
-
# Retrieves
|
81
|
-
# returns `false`. Calls the given block once for each
|
82
|
-
# passed as the
|
80
|
+
# Retrieves remaining results by repeatedly invoking {#next} until
|
81
|
+
# {#next?} returns `false`. Calls the given block once for each
|
82
|
+
# result, which is passed as the argument to the block.
|
83
83
|
#
|
84
84
|
# An Enumerator is returned if no block is given.
|
85
85
|
#
|
86
|
-
# This method
|
87
|
-
# retrieved.
|
88
|
-
#
|
86
|
+
# This method will make repeated API calls until all remaining results
|
87
|
+
# are retrieved. (Unlike `#each`, for example, which merely iterates
|
88
|
+
# over the results returned by a single API call.) Use with caution.
|
89
89
|
#
|
90
90
|
# @param [Integer] request_limit The upper limit of API requests to
|
91
91
|
# make to load all topics. Default is no limit.
|
@@ -54,6 +54,12 @@ module Google
|
|
54
54
|
# end.seconds += 1;
|
55
55
|
# end.nanos -= 1000000000;
|
56
56
|
# }
|
57
|
+
#
|
58
|
+
# Example 3: Compute Duration from datetime.timedelta in Python.
|
59
|
+
#
|
60
|
+
# td = datetime.timedelta(days=3, minutes=10)
|
61
|
+
# duration = Duration()
|
62
|
+
# duration.FromTimedelta(td)
|
57
63
|
# @!attribute [rw] seconds
|
58
64
|
# @return [Integer]
|
59
65
|
# Signed seconds of the span of time. Must be from -315,576,000,000
|
@@ -57,7 +57,7 @@ module Google
|
|
57
57
|
# }
|
58
58
|
#
|
59
59
|
# A repeated field is not allowed except at the last position of a
|
60
|
-
#
|
60
|
+
# paths string.
|
61
61
|
#
|
62
62
|
# If a FieldMask object is not present in a get operation, the
|
63
63
|
# operation applies to all fields (as if a FieldMask of all fields
|
@@ -82,6 +82,58 @@ module Google
|
|
82
82
|
# describe the updated values, the API ignores the values of all
|
83
83
|
# fields not covered by the mask.
|
84
84
|
#
|
85
|
+
# If a repeated field is specified for an update operation, the existing
|
86
|
+
# repeated values in the target resource will be overwritten by the new values.
|
87
|
+
# Note that a repeated field is only allowed in the last position of a +paths+
|
88
|
+
# string.
|
89
|
+
#
|
90
|
+
# If a sub-message is specified in the last position of the field mask for an
|
91
|
+
# update operation, then the existing sub-message in the target resource is
|
92
|
+
# overwritten. Given the target message:
|
93
|
+
#
|
94
|
+
# f {
|
95
|
+
# b {
|
96
|
+
# d : 1
|
97
|
+
# x : 2
|
98
|
+
# }
|
99
|
+
# c : 1
|
100
|
+
# }
|
101
|
+
#
|
102
|
+
# And an update message:
|
103
|
+
#
|
104
|
+
# f {
|
105
|
+
# b {
|
106
|
+
# d : 10
|
107
|
+
# }
|
108
|
+
# }
|
109
|
+
#
|
110
|
+
# then if the field mask is:
|
111
|
+
#
|
112
|
+
# paths: "f.b"
|
113
|
+
#
|
114
|
+
# then the result will be:
|
115
|
+
#
|
116
|
+
# f {
|
117
|
+
# b {
|
118
|
+
# d : 10
|
119
|
+
# }
|
120
|
+
# c : 1
|
121
|
+
# }
|
122
|
+
#
|
123
|
+
# However, if the update mask was:
|
124
|
+
#
|
125
|
+
# paths: "f.b.d"
|
126
|
+
#
|
127
|
+
# then the result would be:
|
128
|
+
#
|
129
|
+
# f {
|
130
|
+
# b {
|
131
|
+
# d : 10
|
132
|
+
# x : 2
|
133
|
+
# }
|
134
|
+
# c : 1
|
135
|
+
# }
|
136
|
+
#
|
85
137
|
# In order to reset a field's value to the default, the field must
|
86
138
|
# be in the mask and set to the default value in the provided resource.
|
87
139
|
# Hence, in order to reset all fields of a resource, provide a default
|
@@ -63,14 +63,12 @@ module Google
|
|
63
63
|
#
|
64
64
|
# Example 5: Compute Timestamp from current time in Python.
|
65
65
|
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
# nanos = int((now - seconds) * 10**9)
|
69
|
-
# timestamp = Timestamp(seconds=seconds, nanos=nanos)
|
66
|
+
# timestamp = Timestamp()
|
67
|
+
# timestamp.GetCurrentTime()
|
70
68
|
# @!attribute [rw] seconds
|
71
69
|
# @return [Integer]
|
72
70
|
# Represents seconds of UTC time since Unix epoch
|
73
|
-
# 1970-01-01T00:00:00Z. Must be from
|
71
|
+
# 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
74
72
|
# 9999-12-31T23:59:59Z inclusive.
|
75
73
|
# @!attribute [rw] nanos
|
76
74
|
# @return [Integer]
|
@@ -1,10 +1,10 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2017, Google Inc. All rights reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
5
5
|
# You may obtain a copy of the License at
|
6
6
|
#
|
7
|
-
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
8
|
#
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
@@ -26,6 +26,7 @@ require "json"
|
|
26
26
|
require "pathname"
|
27
27
|
|
28
28
|
require "google/gax"
|
29
|
+
|
29
30
|
require "google/iam/v1/iam_policy_pb"
|
30
31
|
require "google/pubsub/v1/pubsub_pb"
|
31
32
|
|
@@ -7,10 +7,17 @@
|
|
7
7
|
"UNAVAILABLE"
|
8
8
|
],
|
9
9
|
"one_plus_delivery": [
|
10
|
+
"CANCELLED",
|
11
|
+
"UNKNOWN",
|
10
12
|
"DEADLINE_EXCEEDED",
|
13
|
+
"RESOURCE_EXHAUSTED",
|
14
|
+
"ABORTED",
|
15
|
+
"INTERNAL",
|
11
16
|
"UNAVAILABLE"
|
12
17
|
],
|
13
|
-
"non_idempotent": [
|
18
|
+
"non_idempotent": [
|
19
|
+
"UNAVAILABLE"
|
20
|
+
]
|
14
21
|
},
|
15
22
|
"retry_params": {
|
16
23
|
"default": {
|
@@ -1,10 +1,10 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2017, Google Inc. All rights reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
5
5
|
# You may obtain a copy of the License at
|
6
6
|
#
|
7
|
-
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
8
|
#
|
9
9
|
# Unless required by applicable law or agreed to in writing, software
|
10
10
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
@@ -26,6 +26,7 @@ require "json"
|
|
26
26
|
require "pathname"
|
27
27
|
|
28
28
|
require "google/gax"
|
29
|
+
|
29
30
|
require "google/iam/v1/iam_policy_pb"
|
30
31
|
require "google/pubsub/v1/pubsub_pb"
|
31
32
|
|
@@ -673,6 +674,9 @@ module Google
|
|
673
674
|
# @param subscription [String]
|
674
675
|
# The subscription from which messages should be pulled.
|
675
676
|
# Format is +projects/{project}/subscriptions/{sub}+.
|
677
|
+
# @param max_messages [Integer]
|
678
|
+
# The maximum number of messages returned for this request. The Pub/Sub
|
679
|
+
# system may return fewer than the number specified.
|
676
680
|
# @param return_immediately [true, false]
|
677
681
|
# If this field set to true, the system will respond immediately even if
|
678
682
|
# it there are no messages available to return in the +Pull+ response.
|
@@ -680,9 +684,6 @@ module Google
|
|
680
684
|
# least one message is available, rather than returning no messages. The
|
681
685
|
# client may cancel the request if it does not wish to wait any longer for
|
682
686
|
# the response.
|
683
|
-
# @param max_messages [Integer]
|
684
|
-
# The maximum number of messages returned for this request. The Pub/Sub
|
685
|
-
# system may return fewer than the number specified.
|
686
687
|
# @param options [Google::Gax::CallOptions]
|
687
688
|
# Overrides the default settings for this call, e.g, timeout,
|
688
689
|
# retries, etc.
|
@@ -6,7 +6,16 @@
|
|
6
6
|
"DEADLINE_EXCEEDED",
|
7
7
|
"UNAVAILABLE"
|
8
8
|
],
|
9
|
-
"non_idempotent": [
|
9
|
+
"non_idempotent": [
|
10
|
+
"UNAVAILABLE"
|
11
|
+
],
|
12
|
+
"pull": [
|
13
|
+
"CANCELLED",
|
14
|
+
"DEADLINE_EXCEEDED",
|
15
|
+
"RESOURCE_EXHAUSTED",
|
16
|
+
"INTERNAL",
|
17
|
+
"UNAVAILABLE"
|
18
|
+
]
|
10
19
|
},
|
11
20
|
"retry_params": {
|
12
21
|
"default": {
|
@@ -66,12 +75,12 @@
|
|
66
75
|
},
|
67
76
|
"Pull": {
|
68
77
|
"timeout_millis": 60000,
|
69
|
-
"retry_codes_name": "
|
78
|
+
"retry_codes_name": "pull",
|
70
79
|
"retry_params_name": "messaging"
|
71
80
|
},
|
72
81
|
"StreamingPull": {
|
73
82
|
"timeout_millis": 60000,
|
74
|
-
"retry_codes_name": "
|
83
|
+
"retry_codes_name": "pull",
|
75
84
|
"retry_params_name": "messaging"
|
76
85
|
},
|
77
86
|
"ModifyPushConfig": {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-pubsub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: '1.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: '1.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: google-gax
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
version: '0'
|
236
236
|
requirements: []
|
237
237
|
rubyforge_project:
|
238
|
-
rubygems_version: 2.6.
|
238
|
+
rubygems_version: 2.6.11
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: API Client library for Google Cloud Pub/Sub
|