diff --git a/scylla/src/cloud/config.rs b/scylla/src/cloud/config.rs index bb12a210f..3cc343e6c 100644 --- a/scylla/src/cloud/config.rs +++ b/scylla/src/cloud/config.rs @@ -26,8 +26,11 @@ pub enum CloudConfigError { Ssl(#[from] openssl::error::ErrorStack), } +/// Configuration for creating a session to a serverless cluster. +/// This can be automatically created if you provide the bundle path +/// to the [`CloudSessionBuilder`] constructor. #[derive(Debug)] -pub(crate) struct CloudConfig { +pub struct CloudConfig { datacenters: HashMap, auth_infos: HashMap, @@ -67,6 +70,8 @@ impl CloudConfig { } } +/// Contains all authentication info for creating TLS connections using SNI proxy +/// to connect to cloud nodes. #[derive(Debug)] pub(crate) struct AuthInfo { key: PKey, @@ -97,6 +102,7 @@ impl AuthInfo { } } +/// Contains cloud datacenter configuration for creating TLS connections to its nodes. #[derive(Debug)] pub(crate) struct Datacenter { certificate_authority: X509, @@ -137,6 +143,7 @@ impl Datacenter { } } +/// Contains the names of the primary datacenter and authentication info. #[derive(Debug)] pub(crate) struct Context { datacenter_name: String, diff --git a/scylla/src/transport/session.rs b/scylla/src/transport/session.rs index 6d2c0b4d4..26decce3b 100644 --- a/scylla/src/transport/session.rs +++ b/scylla/src/transport/session.rs @@ -215,9 +215,9 @@ pub struct SessionConfig { /// It is true by default but can be disabled if successive schema-altering statements should be performed. pub refresh_metadata_on_auto_schema_agreement: bool, - // If the driver is to connect to ScyllaCloud, there is a config for it. + /// If the driver is to connect to ScyllaCloud, there is a config for it. #[cfg(feature = "cloud")] - pub(crate) cloud_config: Option>, + pub cloud_config: Option>, /// If true, the driver will inject a small delay before flushing data /// to the socket - by rescheduling the task that writes data to the socket.