Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 92c9e13

Browse files
Pub/Sub: document regional endpoint (#8789)
* document client_options * show an example that sets client_options
1 parent 7f21da8 commit 92c9e13

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

google/cloud/pubsub_v1/publisher/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ class Client(object):
5858
Before being passed along to the GAPIC constructor, a channel may
5959
be added if ``credentials`` are passed explicitly or if the
6060
Pub / Sub emulator is detected as running.
61+
Regional endpoints can be set via `client_options` that takes a
62+
single key-value pair that defines the endpoint, i.e.
63+
`client_options={"api_endpoint": REGIONAL_ENDPOINT}`
6164
"""
6265

6366
_batch_class = thread.Batch

google/cloud/pubsub_v1/subscriber/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ class Client(object):
5353
:class:`~.gapic.pubsub.v1.subscriber_client.SubscriberClient`.
5454
Generally, you should not need to set additional keyword
5555
arguments.
56+
Regional endpoints can be set via `client_options` that takes a
57+
single key-value pair that defines the endpoint, i.e.
58+
`client_options={"api_endpoint": REGIONAL_ENDPOINT}`.
5659
"""
5760

5861
def __init__(self, **kwargs):

0 commit comments

Comments
 (0)