google-cloud-pubsub 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +8 -0
- data/LICENSE +201 -0
- data/README.md +69 -0
- data/lib/google/cloud/pubsub/service.rb +2 -2
- data/lib/google/cloud/pubsub/topic.rb +1 -10
- data/lib/google/cloud/pubsub/v1.rb +2 -2
- data/lib/google/cloud/pubsub/v1/doc/google/protobuf/timestamp.rb +83 -0
- data/lib/google/cloud/pubsub/v1/doc/google/pubsub/v1/pubsub.rb +411 -0
- data/lib/google/cloud/pubsub/v1/{publisher_api.rb → publisher_client.rb} +79 -70
- data/lib/google/cloud/pubsub/v1/{subscriber_api.rb → subscriber_client.rb} +173 -99
- data/lib/google/cloud/pubsub/v1/subscriber_client_config.json +5 -0
- data/lib/google/cloud/pubsub/version.rb +1 -1
- data/lib/google/pubsub/v1/pubsub_pb.rb +12 -0
- data/lib/google/pubsub/v1/pubsub_services_pb.rb +20 -4
- metadata +14 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61a385a46a8067af536ba2631f2b5ab19c4638e2
|
4
|
+
data.tar.gz: 0b13bb7eb71a3ef7bf521a6df143bfc89ce3e11e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 169a2d18f917a849c53f8f92435c18352c73607a24cdf2c8d672922d3574bfd63aa8a79943478225ac870d823ff1369fc4fec33a279d62186c4411cf157a4873
|
7
|
+
data.tar.gz: 3d4407ad0d9da1131fb93ffc524dc453ac6845e0306182be6dd14eb97671fdb845bb020ee7ff2be1fc0ba432dcb1169f64a4b8162d5901a0fa96f1f04dddebc2
|
data/.yardopts
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# google-cloud-pubsub
|
2
|
+
|
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
|
+
|
5
|
+
- [google-cloud-pubsub API documentation](http://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-pubsub/master/google/cloud/pubsub)
|
6
|
+
- [google-cloud-pubsub on RubyGems](https://rubygems.org/gems/[google-cloud-pubsub)
|
7
|
+
- [Google Cloud Pub/Sub documentation](https://cloud.google.com/pubsub/docs)
|
8
|
+
|
9
|
+
## Quick Start
|
10
|
+
|
11
|
+
```sh
|
12
|
+
$ gem install google-cloud-pubsub
|
13
|
+
```
|
14
|
+
|
15
|
+
## Authentication
|
16
|
+
|
17
|
+
This library uses Service Account credentials to connect to Google Cloud services. When running on Compute Engine the credentials will be discovered automatically. When running on other environments the Service Account credentials can be specified by providing the path to the JSON file, or the JSON itself, in environment variables.
|
18
|
+
|
19
|
+
Instructions and configuration options are covered in the [Authentication Guide](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-pubsub/guides/authentication).
|
20
|
+
|
21
|
+
## Example
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require "google/cloud/pubsub"
|
25
|
+
|
26
|
+
pubsub = Google::Cloud::Pubsub.new(
|
27
|
+
project: "my-todo-project",
|
28
|
+
keyfile: "/path/to/keyfile.json"
|
29
|
+
)
|
30
|
+
|
31
|
+
# Retrieve a topic
|
32
|
+
topic = pubsub.topic "my-topic"
|
33
|
+
|
34
|
+
# Publish a new message
|
35
|
+
msg = topic.publish "new-message"
|
36
|
+
|
37
|
+
# Retrieve a subscription
|
38
|
+
sub = pubsub.subscription "my-topic-sub"
|
39
|
+
|
40
|
+
# Pull available messages
|
41
|
+
msgs = sub.pull
|
42
|
+
```
|
43
|
+
|
44
|
+
## Supported Ruby Versions
|
45
|
+
|
46
|
+
This library is supported on Ruby 2.0+.
|
47
|
+
|
48
|
+
## Versioning
|
49
|
+
|
50
|
+
This library follows [Semantic Versioning](http://semver.org/).
|
51
|
+
|
52
|
+
It is currently in major version zero (0.y.z), which means that anything may change at any time and the public API should not be considered stable.
|
53
|
+
|
54
|
+
## Contributing
|
55
|
+
|
56
|
+
Contributions to this library are always welcome and highly encouraged.
|
57
|
+
|
58
|
+
See the [Contributing Guide](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/guides/contributing) for more information on how to get started.
|
59
|
+
|
60
|
+
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct](../CODE_OF_CONDUCT.md) for more information.
|
61
|
+
|
62
|
+
## License
|
63
|
+
|
64
|
+
This library is licensed under Apache 2.0. Full license text is available in [LICENSE](LICENSE).
|
65
|
+
|
66
|
+
## Support
|
67
|
+
|
68
|
+
Please [report bugs at the project on Github](https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues).
|
69
|
+
Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -54,7 +54,7 @@ module Google
|
|
54
54
|
def subscriber
|
55
55
|
return mocked_subscriber if mocked_subscriber
|
56
56
|
@subscriber ||= begin
|
57
|
-
V1::
|
57
|
+
V1::SubscriberClient.new(
|
58
58
|
service_path: host,
|
59
59
|
channel: channel,
|
60
60
|
timeout: timeout,
|
@@ -68,7 +68,7 @@ module Google
|
|
68
68
|
def publisher
|
69
69
|
return mocked_publisher if mocked_publisher
|
70
70
|
@publisher ||= begin
|
71
|
-
V1::
|
71
|
+
V1::PublisherClient.new(
|
72
72
|
service_path: host,
|
73
73
|
channel: channel,
|
74
74
|
timeout: timeout,
|
@@ -96,7 +96,7 @@ module Google
|
|
96
96
|
# start with a letter, and contain only letters ([A-Za-z]), numbers
|
97
97
|
# ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus
|
98
98
|
# (+) or percent signs (%). It must be between 3 and 255 characters in
|
99
|
-
# length, and it must not start with "goog".
|
99
|
+
# length, and it must not start with "goog". Required.
|
100
100
|
# @param [Integer] deadline The maximum number of seconds after a
|
101
101
|
# subscriber receives a message before the subscriber should
|
102
102
|
# acknowledge the message.
|
@@ -114,15 +114,6 @@ module Google
|
|
114
114
|
# sub = topic.subscribe "my-topic-sub"
|
115
115
|
# puts sub.name # => "my-topic-sub"
|
116
116
|
#
|
117
|
-
# @example The name is optional, and will be generated if not given:
|
118
|
-
# require "google/cloud/pubsub"
|
119
|
-
#
|
120
|
-
# pubsub = Google::Cloud::Pubsub.new
|
121
|
-
#
|
122
|
-
# topic = pubsub.topic "my-topic"
|
123
|
-
# sub = topic.subscribe "my-topic-sub"
|
124
|
-
# puts sub.name # => "generated-sub-name"
|
125
|
-
#
|
126
117
|
# @example Wait 2 minutes for acknowledgement and push all to endpoint:
|
127
118
|
# require "google/cloud/pubsub"
|
128
119
|
#
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Copyright 2016 Google Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Protobuf
|
17
|
+
# A Timestamp represents a point in time independent of any time zone
|
18
|
+
# or calendar, represented as seconds and fractions of seconds at
|
19
|
+
# nanosecond resolution in UTC Epoch time. It is encoded using the
|
20
|
+
# Proleptic Gregorian Calendar which extends the Gregorian calendar
|
21
|
+
# backwards to year one. It is encoded assuming all minutes are 60
|
22
|
+
# seconds long, i.e. leap seconds are "smeared" so that no leap second
|
23
|
+
# table is needed for interpretation. Range is from
|
24
|
+
# 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
|
25
|
+
# By restricting to that range, we ensure that we can convert to
|
26
|
+
# and from RFC 3339 date strings.
|
27
|
+
# See {https://www.ietf.org/rfc/rfc3339.txt}[https://www.ietf.org/rfc/rfc3339.txt].
|
28
|
+
#
|
29
|
+
# Example 1: Compute Timestamp from POSIX +time()+.
|
30
|
+
#
|
31
|
+
# Timestamp timestamp;
|
32
|
+
# timestamp.set_seconds(time(NULL));
|
33
|
+
# timestamp.set_nanos(0);
|
34
|
+
#
|
35
|
+
# Example 2: Compute Timestamp from POSIX +gettimeofday()+.
|
36
|
+
#
|
37
|
+
# struct timeval tv;
|
38
|
+
# gettimeofday(&tv, NULL);
|
39
|
+
#
|
40
|
+
# Timestamp timestamp;
|
41
|
+
# timestamp.set_seconds(tv.tv_sec);
|
42
|
+
# timestamp.set_nanos(tv.tv_usec * 1000);
|
43
|
+
#
|
44
|
+
# Example 3: Compute Timestamp from Win32 +GetSystemTimeAsFileTime()+.
|
45
|
+
#
|
46
|
+
# FILETIME ft;
|
47
|
+
# GetSystemTimeAsFileTime(&ft);
|
48
|
+
# UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
49
|
+
#
|
50
|
+
# // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
51
|
+
# // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
52
|
+
# Timestamp timestamp;
|
53
|
+
# timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
54
|
+
# timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
55
|
+
#
|
56
|
+
# Example 4: Compute Timestamp from Java +System.currentTimeMillis()+.
|
57
|
+
#
|
58
|
+
# long millis = System.currentTimeMillis();
|
59
|
+
#
|
60
|
+
# Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
61
|
+
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
62
|
+
#
|
63
|
+
#
|
64
|
+
# Example 5: Compute Timestamp from current time in Python.
|
65
|
+
#
|
66
|
+
# now = time.time()
|
67
|
+
# seconds = int(now)
|
68
|
+
# nanos = int((now - seconds) * 10**9)
|
69
|
+
# timestamp = Timestamp(seconds=seconds, nanos=nanos)
|
70
|
+
# @!attribute [rw] seconds
|
71
|
+
# @return [Integer]
|
72
|
+
# Represents seconds of UTC time since Unix epoch
|
73
|
+
# 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
|
74
|
+
# 9999-12-31T23:59:59Z inclusive.
|
75
|
+
# @!attribute [rw] nanos
|
76
|
+
# @return [Integer]
|
77
|
+
# Non-negative fractions of a second at nanosecond resolution. Negative
|
78
|
+
# second values with fractions must still have non-negative nanos values
|
79
|
+
# that count forward in time. Must be from 0 to 999,999,999
|
80
|
+
# inclusive.
|
81
|
+
class Timestamp; end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,411 @@
|
|
1
|
+
# Copyright 2016 Google Inc. All rights reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Pubsub
|
17
|
+
##
|
18
|
+
# The `Google::Pubsub::V1` module provides the following types:
|
19
|
+
#
|
20
|
+
# Class | Description
|
21
|
+
# ----- | -----------
|
22
|
+
# {Google::Pubsub::V1::AcknowledgeRequest} | Request for the Acknowledge method.
|
23
|
+
# {Google::Pubsub::V1::DeleteSubscriptionRequest} | Request for the DeleteSubscription method.
|
24
|
+
# {Google::Pubsub::V1::DeleteTopicRequest} | Request for the DeleteTopic method.
|
25
|
+
# {Google::Pubsub::V1::GetSubscriptionRequest} | Request for the GetSubscription method.
|
26
|
+
# {Google::Pubsub::V1::GetTopicRequest} | Request for the GetTopic method.
|
27
|
+
# {Google::Pubsub::V1::ListSubscriptionsRequest} | Request for the ListSubscriptions method.
|
28
|
+
# {Google::Pubsub::V1::ListSubscriptionsResponse} | Response for the ListSubscriptions method.
|
29
|
+
# {Google::Pubsub::V1::ListTopicsRequest} | Request for the ListTopics method.
|
30
|
+
# {Google::Pubsub::V1::ListTopicsResponse} | Response for the ListTopics method.
|
31
|
+
# {Google::Pubsub::V1::ListTopicSubscriptionsRequest} | Request for the ListTopicSubscriptions method.
|
32
|
+
# {Google::Pubsub::V1::ListTopicSubscriptionsResponse} | Response for the ListTopicSubscriptions method.
|
33
|
+
# {Google::Pubsub::V1::ModifyAckDeadlineRequest} | Request for the ModifyAckDeadline method.
|
34
|
+
# {Google::Pubsub::V1::ModifyPushConfigRequest} | Request for the ModifyPushConfig method.
|
35
|
+
# {Google::Pubsub::V1::PublishRequest} | Request for the Publish method.
|
36
|
+
# {Google::Pubsub::V1::PublishResponse} | Response for the Publish method.
|
37
|
+
# {Google::Pubsub::V1::PubsubMessage} | A message data and its attributes.
|
38
|
+
# {Google::Pubsub::V1::PullRequest} | Request for the Pull method.
|
39
|
+
# {Google::Pubsub::V1::PullResponse} | Response for the Pull method.
|
40
|
+
# {Google::Pubsub::V1::PushConfig} | Configuration for a push delivery endpoint.
|
41
|
+
# {Google::Pubsub::V1::ReceivedMessage} | A message and its corresponding acknowledgment ID.
|
42
|
+
# {Google::Pubsub::V1::StreamingPullRequest} | Request for the StreamingPull streaming RPC method.
|
43
|
+
# {Google::Pubsub::V1::StreamingPullResponse} | Response for the StreamingPull streaming RPC method.
|
44
|
+
# {Google::Pubsub::V1::Subscription} | A subscription resource.
|
45
|
+
# {Google::Pubsub::V1::Topic} | A topic resource.
|
46
|
+
#
|
47
|
+
module V1
|
48
|
+
# A topic resource.
|
49
|
+
# @!attribute [rw] name
|
50
|
+
# @return [String]
|
51
|
+
# The name of the topic. It must have the format
|
52
|
+
# +"projects/{project}/topics/{topic}"+. +{topic}+ must start with a letter,
|
53
|
+
# and contain only letters (+[A-Za-z]+), numbers (+[0-9]+), dashes (+-+),
|
54
|
+
# underscores (+_+), periods (+.+), tildes (+~+), plus (+++) or percent
|
55
|
+
# signs (+%+). It must be between 3 and 255 characters in length, and it
|
56
|
+
# must not start with +"goog"+.
|
57
|
+
class Topic; end
|
58
|
+
|
59
|
+
# A message data and its attributes. The message payload must not be empty;
|
60
|
+
# it must contain either a non-empty data field, or at least one attribute.
|
61
|
+
# @!attribute [rw] data
|
62
|
+
# @return [String]
|
63
|
+
# The message payload.
|
64
|
+
# @!attribute [rw] attributes
|
65
|
+
# @return [Hash{String => String}]
|
66
|
+
# Optional attributes for this message.
|
67
|
+
# @!attribute [rw] message_id
|
68
|
+
# @return [String]
|
69
|
+
# ID of this message, assigned by the server when the message is published.
|
70
|
+
# Guaranteed to be unique within the topic. This value may be read by a
|
71
|
+
# subscriber that receives a +PubsubMessage+ via a +Pull+ call or a push
|
72
|
+
# delivery. It must not be populated by the publisher in a +Publish+ call.
|
73
|
+
# @!attribute [rw] publish_time
|
74
|
+
# @return [Google::Protobuf::Timestamp]
|
75
|
+
# The time at which the message was published, populated by the server when
|
76
|
+
# it receives the +Publish+ call. It must not be populated by the
|
77
|
+
# publisher in a +Publish+ call.
|
78
|
+
class PubsubMessage; end
|
79
|
+
|
80
|
+
# Request for the GetTopic method.
|
81
|
+
# @!attribute [rw] topic
|
82
|
+
# @return [String]
|
83
|
+
# The name of the topic to get.
|
84
|
+
# Format is +projects/{project}/topics/{topic}+.
|
85
|
+
class GetTopicRequest; end
|
86
|
+
|
87
|
+
# Request for the Publish method.
|
88
|
+
# @!attribute [rw] topic
|
89
|
+
# @return [String]
|
90
|
+
# The messages in the request will be published on this topic.
|
91
|
+
# Format is +projects/{project}/topics/{topic}+.
|
92
|
+
# @!attribute [rw] messages
|
93
|
+
# @return [Array<Google::Pubsub::V1::PubsubMessage>]
|
94
|
+
# The messages to publish.
|
95
|
+
class PublishRequest; end
|
96
|
+
|
97
|
+
# Response for the +Publish+ method.
|
98
|
+
# @!attribute [rw] message_ids
|
99
|
+
# @return [Array<String>]
|
100
|
+
# The server-assigned ID of each published message, in the same order as
|
101
|
+
# the messages in the request. IDs are guaranteed to be unique within
|
102
|
+
# the topic.
|
103
|
+
class PublishResponse; end
|
104
|
+
|
105
|
+
# Request for the +ListTopics+ method.
|
106
|
+
# @!attribute [rw] project
|
107
|
+
# @return [String]
|
108
|
+
# The name of the cloud project that topics belong to.
|
109
|
+
# Format is +projects/{project}+.
|
110
|
+
# @!attribute [rw] page_size
|
111
|
+
# @return [Integer]
|
112
|
+
# Maximum number of topics to return.
|
113
|
+
# @!attribute [rw] page_token
|
114
|
+
# @return [String]
|
115
|
+
# The value returned by the last +ListTopicsResponse+; indicates that this is
|
116
|
+
# a continuation of a prior +ListTopics+ call, and that the system should
|
117
|
+
# return the next page of data.
|
118
|
+
class ListTopicsRequest; end
|
119
|
+
|
120
|
+
# Response for the +ListTopics+ method.
|
121
|
+
# @!attribute [rw] topics
|
122
|
+
# @return [Array<Google::Pubsub::V1::Topic>]
|
123
|
+
# The resulting topics.
|
124
|
+
# @!attribute [rw] next_page_token
|
125
|
+
# @return [String]
|
126
|
+
# If not empty, indicates that there may be more topics that match the
|
127
|
+
# request; this value should be passed in a new +ListTopicsRequest+.
|
128
|
+
class ListTopicsResponse; end
|
129
|
+
|
130
|
+
# Request for the +ListTopicSubscriptions+ method.
|
131
|
+
# @!attribute [rw] topic
|
132
|
+
# @return [String]
|
133
|
+
# The name of the topic that subscriptions are attached to.
|
134
|
+
# Format is +projects/{project}/topics/{topic}+.
|
135
|
+
# @!attribute [rw] page_size
|
136
|
+
# @return [Integer]
|
137
|
+
# Maximum number of subscription names to return.
|
138
|
+
# @!attribute [rw] page_token
|
139
|
+
# @return [String]
|
140
|
+
# The value returned by the last +ListTopicSubscriptionsResponse+; indicates
|
141
|
+
# that this is a continuation of a prior +ListTopicSubscriptions+ call, and
|
142
|
+
# that the system should return the next page of data.
|
143
|
+
class ListTopicSubscriptionsRequest; end
|
144
|
+
|
145
|
+
# Response for the +ListTopicSubscriptions+ method.
|
146
|
+
# @!attribute [rw] subscriptions
|
147
|
+
# @return [Array<String>]
|
148
|
+
# The names of the subscriptions that match the request.
|
149
|
+
# @!attribute [rw] next_page_token
|
150
|
+
# @return [String]
|
151
|
+
# If not empty, indicates that there may be more subscriptions that match
|
152
|
+
# the request; this value should be passed in a new
|
153
|
+
# +ListTopicSubscriptionsRequest+ to get more subscriptions.
|
154
|
+
class ListTopicSubscriptionsResponse; end
|
155
|
+
|
156
|
+
# Request for the +DeleteTopic+ method.
|
157
|
+
# @!attribute [rw] topic
|
158
|
+
# @return [String]
|
159
|
+
# Name of the topic to delete.
|
160
|
+
# Format is +projects/{project}/topics/{topic}+.
|
161
|
+
class DeleteTopicRequest; end
|
162
|
+
|
163
|
+
# A subscription resource.
|
164
|
+
# @!attribute [rw] name
|
165
|
+
# @return [String]
|
166
|
+
# The name of the subscription. It must have the format
|
167
|
+
# +"projects/{project}/subscriptions/{subscription}"+. +{subscription}+ must
|
168
|
+
# start with a letter, and contain only letters (+[A-Za-z]+), numbers
|
169
|
+
# (+[0-9]+), dashes (+-+), underscores (+_+), periods (+.+), tildes (+~+),
|
170
|
+
# plus (+++) or percent signs (+%+). It must be between 3 and 255 characters
|
171
|
+
# in length, and it must not start with +"goog"+.
|
172
|
+
# @!attribute [rw] topic
|
173
|
+
# @return [String]
|
174
|
+
# The name of the topic from which this subscription is receiving messages.
|
175
|
+
# Format is +projects/{project}/topics/{topic}+.
|
176
|
+
# The value of this field will be +_deleted-topic_+ if the topic has been
|
177
|
+
# deleted.
|
178
|
+
# @!attribute [rw] push_config
|
179
|
+
# @return [Google::Pubsub::V1::PushConfig]
|
180
|
+
# If push delivery is used with this subscription, this field is
|
181
|
+
# used to configure it. An empty +pushConfig+ signifies that the subscriber
|
182
|
+
# will pull and ack messages using API methods.
|
183
|
+
# @!attribute [rw] ack_deadline_seconds
|
184
|
+
# @return [Integer]
|
185
|
+
# This value is the maximum time after a subscriber receives a message
|
186
|
+
# before the subscriber should acknowledge the message. After message
|
187
|
+
# delivery but before the ack deadline expires and before the message is
|
188
|
+
# acknowledged, it is an outstanding message and will not be delivered
|
189
|
+
# again during that time (on a best-effort basis).
|
190
|
+
#
|
191
|
+
# For pull subscriptions, this value is used as the initial value for the ack
|
192
|
+
# deadline. To override this value for a given message, call
|
193
|
+
# +ModifyAckDeadline+ with the corresponding +ack_id+ if using
|
194
|
+
# pull.
|
195
|
+
# The minimum custom deadline you can specify is 10 seconds.
|
196
|
+
# The maximum custom deadline you can specify is 600 seconds (10 minutes).
|
197
|
+
# If this parameter is 0, a default value of 10 seconds is used.
|
198
|
+
#
|
199
|
+
# For push delivery, this value is also used to set the request timeout for
|
200
|
+
# the call to the push endpoint.
|
201
|
+
#
|
202
|
+
# If the subscriber never acknowledges the message, the Pub/Sub
|
203
|
+
# system will eventually redeliver the message.
|
204
|
+
class Subscription; end
|
205
|
+
|
206
|
+
# Configuration for a push delivery endpoint.
|
207
|
+
# @!attribute [rw] push_endpoint
|
208
|
+
# @return [String]
|
209
|
+
# A URL locating the endpoint to which messages should be pushed.
|
210
|
+
# For example, a Webhook endpoint might use "https://example.com/push".
|
211
|
+
# @!attribute [rw] attributes
|
212
|
+
# @return [Hash{String => String}]
|
213
|
+
# Endpoint configuration attributes.
|
214
|
+
#
|
215
|
+
# Every endpoint has a set of API supported attributes that can be used to
|
216
|
+
# control different aspects of the message delivery.
|
217
|
+
#
|
218
|
+
# The currently supported attribute is +x-goog-version+, which you can
|
219
|
+
# use to change the format of the push message. This attribute
|
220
|
+
# indicates the version of the data expected by the endpoint. This
|
221
|
+
# controls the shape of the envelope (i.e. its fields and metadata).
|
222
|
+
# The endpoint version is based on the version of the Pub/Sub
|
223
|
+
# API.
|
224
|
+
#
|
225
|
+
# If not present during the +CreateSubscription+ call, it will default to
|
226
|
+
# the version of the API used to make such call. If not present during a
|
227
|
+
# +ModifyPushConfig+ call, its value will not be changed. +GetSubscription+
|
228
|
+
# calls will always return a valid version, even if the subscription was
|
229
|
+
# created without this attribute.
|
230
|
+
#
|
231
|
+
# The possible values for this attribute are:
|
232
|
+
#
|
233
|
+
# * +v1beta1+: uses the push format defined in the v1beta1 Pub/Sub API.
|
234
|
+
# * +v1+ or +v1beta2+: uses the push format defined in the v1 Pub/Sub API.
|
235
|
+
class PushConfig; end
|
236
|
+
|
237
|
+
# A message and its corresponding acknowledgment ID.
|
238
|
+
# @!attribute [rw] ack_id
|
239
|
+
# @return [String]
|
240
|
+
# This ID can be used to acknowledge the received message.
|
241
|
+
# @!attribute [rw] message
|
242
|
+
# @return [Google::Pubsub::V1::PubsubMessage]
|
243
|
+
# The message.
|
244
|
+
class ReceivedMessage; end
|
245
|
+
|
246
|
+
# Request for the GetSubscription method.
|
247
|
+
# @!attribute [rw] subscription
|
248
|
+
# @return [String]
|
249
|
+
# The name of the subscription to get.
|
250
|
+
# Format is +projects/{project}/subscriptions/{sub}+.
|
251
|
+
class GetSubscriptionRequest; end
|
252
|
+
|
253
|
+
# Request for the +ListSubscriptions+ method.
|
254
|
+
# @!attribute [rw] project
|
255
|
+
# @return [String]
|
256
|
+
# The name of the cloud project that subscriptions belong to.
|
257
|
+
# Format is +projects/{project}+.
|
258
|
+
# @!attribute [rw] page_size
|
259
|
+
# @return [Integer]
|
260
|
+
# Maximum number of subscriptions to return.
|
261
|
+
# @!attribute [rw] page_token
|
262
|
+
# @return [String]
|
263
|
+
# The value returned by the last +ListSubscriptionsResponse+; indicates that
|
264
|
+
# this is a continuation of a prior +ListSubscriptions+ call, and that the
|
265
|
+
# system should return the next page of data.
|
266
|
+
class ListSubscriptionsRequest; end
|
267
|
+
|
268
|
+
# Response for the +ListSubscriptions+ method.
|
269
|
+
# @!attribute [rw] subscriptions
|
270
|
+
# @return [Array<Google::Pubsub::V1::Subscription>]
|
271
|
+
# The subscriptions that match the request.
|
272
|
+
# @!attribute [rw] next_page_token
|
273
|
+
# @return [String]
|
274
|
+
# If not empty, indicates that there may be more subscriptions that match
|
275
|
+
# the request; this value should be passed in a new
|
276
|
+
# +ListSubscriptionsRequest+ to get more subscriptions.
|
277
|
+
class ListSubscriptionsResponse; end
|
278
|
+
|
279
|
+
# Request for the DeleteSubscription method.
|
280
|
+
# @!attribute [rw] subscription
|
281
|
+
# @return [String]
|
282
|
+
# The subscription to delete.
|
283
|
+
# Format is +projects/{project}/subscriptions/{sub}+.
|
284
|
+
class DeleteSubscriptionRequest; end
|
285
|
+
|
286
|
+
# Request for the ModifyPushConfig method.
|
287
|
+
# @!attribute [rw] subscription
|
288
|
+
# @return [String]
|
289
|
+
# The name of the subscription.
|
290
|
+
# Format is +projects/{project}/subscriptions/{sub}+.
|
291
|
+
# @!attribute [rw] push_config
|
292
|
+
# @return [Google::Pubsub::V1::PushConfig]
|
293
|
+
# The push configuration for future deliveries.
|
294
|
+
#
|
295
|
+
# An empty +pushConfig+ indicates that the Pub/Sub system should
|
296
|
+
# stop pushing messages from the given subscription and allow
|
297
|
+
# messages to be pulled and acknowledged - effectively pausing
|
298
|
+
# the subscription if +Pull+ is not called.
|
299
|
+
class ModifyPushConfigRequest; end
|
300
|
+
|
301
|
+
# Request for the +Pull+ method.
|
302
|
+
# @!attribute [rw] subscription
|
303
|
+
# @return [String]
|
304
|
+
# The subscription from which messages should be pulled.
|
305
|
+
# Format is +projects/{project}/subscriptions/{sub}+.
|
306
|
+
# @!attribute [rw] return_immediately
|
307
|
+
# @return [true, false]
|
308
|
+
# If this field set to true, the system will respond immediately even if
|
309
|
+
# it there are no messages available to return in the +Pull+ response.
|
310
|
+
# Otherwise, the system may wait (for a bounded amount of time) until at
|
311
|
+
# least one message is available, rather than returning no messages. The
|
312
|
+
# client may cancel the request if it does not wish to wait any longer for
|
313
|
+
# the response.
|
314
|
+
# @!attribute [rw] max_messages
|
315
|
+
# @return [Integer]
|
316
|
+
# The maximum number of messages returned for this request. The Pub/Sub
|
317
|
+
# system may return fewer than the number specified.
|
318
|
+
class PullRequest; end
|
319
|
+
|
320
|
+
# Response for the +Pull+ method.
|
321
|
+
# @!attribute [rw] received_messages
|
322
|
+
# @return [Array<Google::Pubsub::V1::ReceivedMessage>]
|
323
|
+
# Received Pub/Sub messages. The Pub/Sub system will return zero messages if
|
324
|
+
# there are no more available in the backlog. The Pub/Sub system may return
|
325
|
+
# fewer than the +maxMessages+ requested even if there are more messages
|
326
|
+
# available in the backlog.
|
327
|
+
class PullResponse; end
|
328
|
+
|
329
|
+
# Request for the ModifyAckDeadline method.
|
330
|
+
# @!attribute [rw] subscription
|
331
|
+
# @return [String]
|
332
|
+
# The name of the subscription.
|
333
|
+
# Format is +projects/{project}/subscriptions/{sub}+.
|
334
|
+
# @!attribute [rw] ack_ids
|
335
|
+
# @return [Array<String>]
|
336
|
+
# List of acknowledgment IDs.
|
337
|
+
# @!attribute [rw] ack_deadline_seconds
|
338
|
+
# @return [Integer]
|
339
|
+
# The new ack deadline with respect to the time this request was sent to
|
340
|
+
# the Pub/Sub system. For example, if the value is 10, the new
|
341
|
+
# ack deadline will expire 10 seconds after the +ModifyAckDeadline+ call
|
342
|
+
# was made. Specifying zero may immediately make the message available for
|
343
|
+
# another pull request.
|
344
|
+
# The minimum deadline you can specify is 0 seconds.
|
345
|
+
# The maximum deadline you can specify is 600 seconds (10 minutes).
|
346
|
+
class ModifyAckDeadlineRequest; end
|
347
|
+
|
348
|
+
# Request for the Acknowledge method.
|
349
|
+
# @!attribute [rw] subscription
|
350
|
+
# @return [String]
|
351
|
+
# The subscription whose message is being acknowledged.
|
352
|
+
# Format is +projects/{project}/subscriptions/{sub}+.
|
353
|
+
# @!attribute [rw] ack_ids
|
354
|
+
# @return [Array<String>]
|
355
|
+
# The acknowledgment ID for the messages being acknowledged that was returned
|
356
|
+
# by the Pub/Sub system in the +Pull+ response. Must not be empty.
|
357
|
+
class AcknowledgeRequest; end
|
358
|
+
|
359
|
+
# Request for the +StreamingPull+ streaming RPC method. This request is used to
|
360
|
+
# establish the initial stream as well as to stream acknowledgements and ack
|
361
|
+
# deadline modifications from the client to the server.
|
362
|
+
# @!attribute [rw] subscription
|
363
|
+
# @return [String]
|
364
|
+
# The subscription for which to initialize the new stream. This must be
|
365
|
+
# provided in the first request on the stream, and must not be set in
|
366
|
+
# subsequent requests from client to server.
|
367
|
+
# Format is +projects/{project}/subscriptions/{sub}+.
|
368
|
+
# @!attribute [rw] ack_ids
|
369
|
+
# @return [Array<String>]
|
370
|
+
# List of acknowledgement IDs for acknowledging previously received messages
|
371
|
+
# (received on this stream or a different stream). If an ack ID has expired,
|
372
|
+
# the corresponding message may be redelivered later. Acknowledging a message
|
373
|
+
# more than once will not result in an error. If the acknowledgement ID is
|
374
|
+
# malformed, the stream will be aborted with status +INVALID_ARGUMENT+.
|
375
|
+
# @!attribute [rw] modify_deadline_seconds
|
376
|
+
# @return [Array<Integer>]
|
377
|
+
# The list of new ack deadlines for the IDs listed in
|
378
|
+
# +modify_deadline_ack_ids+. The size of this list must be the same as the
|
379
|
+
# size of +modify_deadline_ack_ids+. If it differs the stream will be aborted
|
380
|
+
# with +INVALID_ARGUMENT+. Each element in this list is applied to the
|
381
|
+
# element in the same position in +modify_deadline_ack_ids+. The new ack
|
382
|
+
# deadline is with respect to the time this request was sent to the Pub/Sub
|
383
|
+
# system. Must be >= 0. For example, if the value is 10, the new ack deadline
|
384
|
+
# will expire 10 seconds after this request is received. If the value is 0,
|
385
|
+
# the message is immediately made available for another streaming or
|
386
|
+
# non-streaming pull request. If the value is < 0 (an error), the stream will
|
387
|
+
# be aborted with status +INVALID_ARGUMENT+.
|
388
|
+
# @!attribute [rw] modify_deadline_ack_ids
|
389
|
+
# @return [Array<String>]
|
390
|
+
# List of acknowledgement IDs whose deadline will be modified based on the
|
391
|
+
# corresponding element in +modify_deadline_seconds+. This field can be used
|
392
|
+
# to indicate that more time is needed to process a message by the
|
393
|
+
# subscriber, or to make the message available for redelivery if the
|
394
|
+
# processing was interrupted.
|
395
|
+
# @!attribute [rw] stream_ack_deadline_seconds
|
396
|
+
# @return [Integer]
|
397
|
+
# The ack deadline to use for the stream. This must be provided in the
|
398
|
+
# first request on the stream, but it can also be updated on subsequent
|
399
|
+
# requests from client to server. The minimum deadline you can specify is 10
|
400
|
+
# seconds. The maximum deadline you can specify is 600 seconds (10 minutes).
|
401
|
+
class StreamingPullRequest; end
|
402
|
+
|
403
|
+
# Response for the +StreamingPull+ method. This response is used to stream
|
404
|
+
# messages from the server to the client.
|
405
|
+
# @!attribute [rw] received_messages
|
406
|
+
# @return [Array<Google::Pubsub::V1::ReceivedMessage>]
|
407
|
+
# Received Pub/Sub messages. This will not be empty.
|
408
|
+
class StreamingPullResponse; end
|
409
|
+
end
|
410
|
+
end
|
411
|
+
end
|