Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/pubsub/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,11 @@ pub mod model_ext {
///
/// ```
/// # async fn sample() -> anyhow::Result<()> {
/// use google_cloud_pubsub::client::BasePublisher;
/// use google_cloud_pubsub::client::Publisher;
/// use google_cloud_pubsub::model::PubsubMessage;
///
/// // Create a client for creating publishers.
/// let client = BasePublisher::builder().build().await?;
///
/// // Create a publisher that handles batching for a specific topic.
/// let publisher = client.publisher("projects/my-project/topics/my-topic").build();
/// let publisher = Publisher::builder("projects/my-project/topics/my-topic").build().await?;
///
/// // Publish several messages.
/// // The client will automatically batch them in the background.
Expand Down
5 changes: 3 additions & 2 deletions src/pubsub/src/publisher/base_publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use crate::publisher::publisher::PublisherPartialBuilder;

/// Creates [`Publisher`](super::publisher::Publisher) instances.
///
/// This is the main entry point for the publisher API. A single `BasePublisher`
/// can be used to create multiple `Publisher` clients for different topics.
/// A single `BasePublisher` can be used to create multiple `Publisher`
/// clients for different topics.
Copy link
Member

Choose a reason for hiding this comment

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

nit: reflow?

/// It manages the underlying gRPC connection and authentication.
///
/// # Example
Expand Down Expand Up @@ -64,6 +64,7 @@ pub type BasePublisherBuilder =
pub(crate) mod client_builder {
use super::BasePublisher;

#[derive(Clone, Debug)]
pub struct Factory;
impl gax::client_builder::internal::ClientFactory for Factory {
type Client = BasePublisher;
Expand Down
Loading
Loading