Skip to content

Commit

Permalink
docs(pubsublite): associate examples with the correct function (#7827)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdiep authored Apr 25, 2023
1 parent e41aae2 commit 481b161
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pubsublite/pscompat/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func ExamplePublisherClient_Publish() {
// This example illustrates how to configure OAuth tokens to be refreshed 5
// minutes before they expire, in order to mitigate delays which may occur
// during refresh.
func ExamplePublisherClient_Publish_earlyTokenRefresh() {
func ExampleNewPublisherClient_earlyTokenRefresh() {
ctx := context.Background()
const topic = "projects/my-project/locations/region-or-zone/topics/my-topic"
params := google.CredentialsParams{
Expand Down Expand Up @@ -116,7 +116,7 @@ func ExamplePublisherClient_Publish_earlyTokenRefresh() {
// that batching settings apply per partition. If BufferedByteLimit is being
// used to bound memory usage, keep in mind the number of partitions in the
// topic.
func ExamplePublisherClient_Publish_batchingSettings() {
func ExampleNewPublisherClientWithSettings_batchingSettings() {
ctx := context.Background()
const topic = "projects/my-project/locations/region-or-zone/topics/my-topic"
settings := pscompat.PublishSettings{
Expand Down Expand Up @@ -287,7 +287,7 @@ func ExampleSubscriberClient_Receive_errorHandling() {
// being processed at once, you can bound your program's resource consumption.
// Note that ReceiveSettings apply per partition, so keep in mind the number of
// partitions in the associated topic.
func ExampleSubscriberClient_Receive_maxOutstanding() {
func ExampleNewSubscriberClientWithSettings_maxOutstanding() {
ctx := context.Background()
const subscription = "projects/my-project/locations/region-or-zone/subscriptions/my-subscription"
settings := pscompat.ReceiveSettings{
Expand Down Expand Up @@ -317,7 +317,7 @@ func ExampleSubscriberClient_Receive_maxOutstanding() {
// SubscriberClient should connect to. If not specified, the SubscriberClient
// will use Pub/Sub Lite's partition assignment service to automatically
// determine which partitions it should connect to.
func ExampleSubscriberClient_Receive_manualPartitionAssignment() {
func ExampleNewSubscriberClientWithSettings_manualPartitionAssignment() {
ctx := context.Background()
const subscription = "projects/my-project/locations/region-or-zone/subscriptions/my-subscription"
settings := pscompat.ReceiveSettings{
Expand Down

0 comments on commit 481b161

Please sign in to comment.