Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcd57e65

Browse files
anguillanneufplamut
authored andcommitted
Pub/Sub: surface publish future in documentation (#8229)
* surface publish future in documentation* Update class definition
1 parent4b5b2a1 commitcd57e65

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Futures
2+
=======
3+
4+
..automodule::google.cloud.pubsub_v1.publisher.futures
5+
:members:
6+
:inherited-members:

‎pubsub/docs/publisher/index.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Futures
9595
-------
9696

9797
Every call to:meth:`~.pubsub_v1.publisher.client.Client.publish` returns
98-
an instance of:class:`google.api_core.future.Future`.
98+
an instance of:class:`~.pubsub_v1.publisher.futures.Future`.
9999

100100
..note::
101101

@@ -135,3 +135,4 @@ API Reference
135135
:maxdepth:2
136136

137137
api/client
138+
api/futures

‎pubsub/google/cloud/pubsub_v1/publisher/futures.py‎

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright2017, Google LLC All rights reserved.
1+
# Copyright2019, Google LLC All rights reserved.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -18,22 +18,11 @@
1818

1919

2020
classFuture(futures.Future):
21-
"""Encapsulation of the asynchronous execution of an action.
22-
23-
This object is returned from asychronous Pub/Sub publishing calls, and is
24-
the interface to determine the status of those calls.
25-
26-
This object should not be created directly, but is returned by other
27-
methods in this library.
28-
29-
Args:
30-
completed (Optional[Any]): An event, with the same interface as
31-
:class:`threading.Event`. This is provided so that callers
32-
with different concurrency models (e.g. ``threading`` or
33-
``multiprocessing``) can supply an event that is compatible
34-
with that model. The ``wait()`` and ``set()`` methods will be
35-
used. If this argument is not provided, then a new
36-
:class:`threading.Event` will be created and used.
21+
"""This future object is returned from asychronous Pub/Sub publishing
22+
calls.
23+
24+
Calling :meth:`result` will resolve the future by returning the message
25+
ID, unless an error occurs.
3726
"""
3827

3928
defresult(self,timeout=None):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp