arrow_zerobus_sdk_wrapper/lib.rs
1//! Arrow Zerobus SDK Wrapper
2//!
3//! Cross-platform Rust SDK wrapper for Databricks Zerobus with Python bindings.
4//! Provides a unified API for sending Arrow RecordBatch data to Zerobus with
5//! automatic protocol conversion, authentication, retry logic, and observability.
6//!
7//! # Features
8//!
9//! - Rust SDK API for sending Arrow RecordBatch data to Zerobus
10//! - Python bindings (Python 3.11+) via PyO3
11//! - Automatic retry with exponential backoff + jitter
12//! - Automatic token refresh for long-running operations
13//! - OpenTelemetry observability integration
14//! - Optional debug file output (Arrow + Protobuf)
15//! - Thread-safe concurrent operations
16//!
17//! # Example
18//!
19//! ```no_run
20//! use arrow_zerobus_sdk_wrapper::{ZerobusWrapper, WrapperConfiguration};
21//! use arrow::record_batch::RecordBatch;
22//!
23//! # async fn example() -> Result<(), arrow_zerobus_sdk_wrapper::ZerobusError> {
24//! # let config = WrapperConfiguration::new(
25//! # "https://workspace.cloud.databricks.com".to_string(),
26//! # "my_table".to_string(),
27//! # )
28//! # .with_credentials("client_id".to_string(), "client_secret".to_string())
29//! # .with_unity_catalog("https://unity-catalog-url".to_string());
30//! # let wrapper = ZerobusWrapper::new(config).await?;
31//! # // Create and send a RecordBatch here
32//! # wrapper.shutdown().await?;
33//! # Ok(())
34//! # }
35//! ```
36
37pub mod config;
38pub mod error;
39pub mod observability;
40pub mod utils;
41pub mod wrapper;
42
43#[cfg(feature = "python")]
44pub mod python;
45
46pub use config::{OtlpConfig, OtlpSdkConfig, WrapperConfiguration};
47pub use error::ZerobusError;
48pub use wrapper::{ErrorStatistics, TransmissionResult, ZerobusWrapper};