1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Salesforce Pub/Sub API for real-time event streaming.
//!
//! This module provides access to the Salesforce Pub/Sub API, which allows you to:
//! - Subscribe to platform events and change data capture events
//! - Publish custom platform events
//! - Manage gRPC connections with automatic authentication
//!
//! # Example
//!
//! ```no_run
//! use salesforce_core::client;
//! use salesforce_core::pubsubapi::Client as PubSubClient;
//! use salesforce_core_pubsubapi::eventbus;
//! use std::path::PathBuf;
//!
//! # #[tokio::main]
//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let auth_client = client::Builder::new()
//! .credentials_path(PathBuf::from("credentials.json"))
//! .build()?
//! .connect()
//! .await?;
//!
//! let channel = tonic::transport::Channel::from_static(eventbus::ENDPOINT)
//! .connect()
//! .await?;
//!
//! let mut pubsub_client = PubSubClient::new(channel, auth_client)?;
//! # Ok(())
//! # }
//! ```
pub use Client;
pub use Error as PubSubError;
/// Re-export commonly used types from the generated gRPC client.
pub use ;
/// Constant for the Pub/Sub API endpoint.
pub use ENDPOINT;