Skip to content

Commit f3d41c9

Browse files
authored
Merge pull request #750 from Gor027/public_cloud_config
Make `CloudConfig` public
2 parents d9f3b92 + 30a24d4 commit f3d41c9

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

scylla/src/cloud/config.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ pub enum CloudConfigError {
2626
Ssl(#[from] openssl::error::ErrorStack),
2727
}
2828

29+
/// Configuration for creating a session to a serverless cluster.
30+
/// This can be automatically created if you provide the bundle path
31+
/// to the [`CloudSessionBuilder`] constructor.
2932
#[derive(Debug)]
30-
pub(crate) struct CloudConfig {
33+
pub struct CloudConfig {
3134
datacenters: HashMap<String, Datacenter>,
3235
auth_infos: HashMap<String, AuthInfo>,
3336

@@ -67,6 +70,8 @@ impl CloudConfig {
6770
}
6871
}
6972

73+
/// Contains all authentication info for creating TLS connections using SNI proxy
74+
/// to connect to cloud nodes.
7075
#[derive(Debug)]
7176
pub(crate) struct AuthInfo {
7277
key: PKey<Private>,
@@ -97,6 +102,7 @@ impl AuthInfo {
97102
}
98103
}
99104

105+
/// Contains cloud datacenter configuration for creating TLS connections to its nodes.
100106
#[derive(Debug)]
101107
pub(crate) struct Datacenter {
102108
certificate_authority: X509,
@@ -137,6 +143,7 @@ impl Datacenter {
137143
}
138144
}
139145

146+
/// Contains the names of the primary datacenter and authentication info.
140147
#[derive(Debug)]
141148
pub(crate) struct Context {
142149
datacenter_name: String,

scylla/src/transport/session.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ pub struct SessionConfig {
215215
/// It is true by default but can be disabled if successive schema-altering statements should be performed.
216216
pub refresh_metadata_on_auto_schema_agreement: bool,
217217

218-
// If the driver is to connect to ScyllaCloud, there is a config for it.
218+
/// If the driver is to connect to ScyllaCloud, there is a config for it.
219219
#[cfg(feature = "cloud")]
220-
pub(crate) cloud_config: Option<Arc<CloudConfig>>,
220+
pub cloud_config: Option<Arc<CloudConfig>>,
221221

222222
/// If true, the driver will inject a small delay before flushing data
223223
/// to the socket - by rescheduling the task that writes data to the socket.

0 commit comments

Comments
 (0)