xanderbailey commented on code in PR #2650:
URL: https://github.com/apache/iceberg-rust/pull/2650#discussion_r3539944273
##########
crates/iceberg/src/catalog/mod.rs:
##########
@@ -152,6 +153,28 @@ pub trait CatalogBuilder: Default + Debug + Send + Sync {
/// ```
fn with_storage_factory(self, storage_factory: Arc<dyn StorageFactory>) ->
Self;
+ /// Set a [`KmsClientFactory`] to enable table encryption.
+ ///
+ /// When provided, the catalog calls the factory once during
+ /// [`load`](Self::load) with the catalog properties to create a shared
+ /// [`KeyManagementClient`](crate::encryption::KeyManagementClient).
+ /// That client is then passed to each table's `TableBuilder` so tables
+ /// with `encryption.key-id` set can construct an `EncryptionManager`.
+ ///
+ /// # Example
+ ///
+ /// ```rust,ignore
+ /// use iceberg::CatalogBuilder;
+ /// use iceberg::encryption::kms::KmsClientFactory;
+ /// use std::sync::Arc;
+ ///
+ /// let catalog = MyCatalogBuilder::default()
+ /// .with_kms_client_factory(Arc::new(MyKmsClientFactory))
Review Comment:
Yeah I suspect this is desired
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]