Skip to content

Commit

Permalink
Pub/Sub: document regional endpoint (#8789)
Browse files Browse the repository at this point in the history
* document client_options

* show an example that sets client_options
  • Loading branch information
anguillanneuf authored Jul 26, 2019
1 parent db9b191 commit 03aabdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pubsub/google/cloud/pubsub_v1/publisher/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class Client(object):
Before being passed along to the GAPIC constructor, a channel may
be added if ``credentials`` are passed explicitly or if the
Pub / Sub emulator is detected as running.
Regional endpoints can be set via `client_options` that takes a
single key-value pair that defines the endpoint, i.e.
`client_options={"api_endpoint": REGIONAL_ENDPOINT}`
"""

_batch_class = thread.Batch
Expand Down
3 changes: 3 additions & 0 deletions pubsub/google/cloud/pubsub_v1/subscriber/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ class Client(object):
:class:`~.gapic.pubsub.v1.subscriber_client.SubscriberClient`.
Generally, you should not need to set additional keyword
arguments.
Regional endpoints can be set via `client_options` that takes a
single key-value pair that defines the endpoint, i.e.
`client_options={"api_endpoint": REGIONAL_ENDPOINT}`.
"""

def __init__(self, **kwargs):
Expand Down

0 comments on commit 03aabdd

Please sign in to comment.