Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(pubsub): samples for endpoint and auth #10136

Merged
merged 3 commits into from
Oct 30, 2022

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Oct 30, 2022

For each *Client class add an examples showing how to override the default endpoint and authentication credentials. Reference these examples from the landing page, as this is one of the most common questions for the client libraries.

Fixes #10133 and fixes #10132


This change is Reviewable

@product-auto-label product-auto-label bot added api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples. labels Oct 30, 2022
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: dc91abae39f0da66ff08f0a1e1a52a7cbb04a802

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@codecov
Copy link

codecov bot commented Oct 30, 2022

Codecov Report

Base: 93.97% // Head: 93.97% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (f95c809) compared to base (f3be4c5).
Patch coverage: 85.24% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10136      +/-   ##
==========================================
- Coverage   93.97%   93.97%   -0.01%     
==========================================
  Files        1523     1524       +1     
  Lines      140149   140332     +183     
==========================================
+ Hits       131712   131882     +170     
- Misses       8437     8450      +13     
Impacted Files Coverage Δ
google/cloud/pubsub/samples/client_samples.cc 85.24% <85.24%> (ø)
google/cloud/internal/async_connection_ready.cc 89.36% <0.00%> (-4.26%) ⬇️
...integration_tests/schema_admin_integration_test.cc 98.88% <0.00%> (-1.12%) ⬇️
google/cloud/pubsub/samples/samples.cc 90.70% <0.00%> (-0.08%) ⬇️
...cloud/pubsub/internal/subscription_session_test.cc 97.98% <0.00%> (+0.16%) ⬆️
google/cloud/pubsub/subscriber_connection_test.cc 98.36% <0.00%> (+0.54%) ⬆️
...le/cloud/internal/default_completion_queue_impl.cc 97.15% <0.00%> (+0.56%) ⬆️
...ogle/cloud/pubsub/subscription_admin_connection.cc 84.00% <0.00%> (+1.00%) ⬆️
google/cloud/pubsub/schema_admin_connection.cc 92.38% <0.00%> (+1.90%) ⬆️
google/cloud/pubsub/subscriber_connection.cc 79.71% <0.00%> (+2.89%) ⬆️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: 86000871144cff75361c9e8678c86b8446764817

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan marked this pull request as ready for review October 30, 2022 15:23
@coryan coryan requested a review from a team as a code owner October 30, 2022 15:23
using ::google::cloud::pubsub::examples::RandomTopicId;

void PublisherSetEndpoint(std::vector<std::string> const& argv) {
namespace examples = ::google::cloud::testing_util;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other samples (rightfully, IMO) include google/cloud/testing_util/example_driver.h directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

For each `*Client` class add an examples showing how to override the
default endpoint and authentication credentials. Reference these
examples from the landing page, as this is one of the most common
questions for the client libraries.
@coryan coryan force-pushed the doc-pubsub-client-samples branch from 8600087 to f95c809 Compare October 30, 2022 17:24
@coryan coryan enabled auto-merge (squash) October 30, 2022 17:25
@google-cloud-cpp-bot
Copy link
Collaborator

Google Cloud Build Logs
For commit: f95c8099c007e27f1e01f89498bdbe584eac16bd

ℹ️ NOTE: Kokoro logs are linked from "Details" below.

@coryan coryan merged commit 554a496 into googleapis:main Oct 30, 2022
@coryan coryan deleted the doc-pubsub-client-samples branch October 30, 2022 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pub/Sub default authentication credentials Pub/Sub default endpoints
3 participants