xanderbailey commented on code in PR #2650:
URL: https://github.com/apache/iceberg-rust/pull/2650#discussion_r3545269887
##########
crates/iceberg/src/encryption/kms/memory.rs:
##########
@@ -142,6 +143,39 @@ impl MemoryKeyManagementClient {
}
}
+/// Factory for creating [`MemoryKeyManagementClient`] instances.
+///
+/// This factory creates a fresh in-memory KMS client for each call.
+/// Useful for testing encryption flows without a real KMS backend.
+#[derive(Debug, Clone)]
+pub struct MemoryKmsClientFactory {
+ master_keys: Arc<RwLock<HashMap<String, SensitiveBytes>>>,
+ master_key_size: AesKeySize,
+}
+
+impl MemoryKmsClientFactory {
+ /// Creates a new factory that will produce clients sharing the given
master keys.
+ pub fn new(kms: &MemoryKeyManagementClient) -> Self {
Review Comment:
Have updated now to hopefully have better ergonomics for the API
[0e47498](https://github.com/apache/iceberg-rust/pull/2650/commits/0e4749802413a12ecc55b0f25ecdf88e398b2f71)
Let me know what you think.
--
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]