Method: Mongo::Crypt::EncryptionIO#initialize
- Defined in:
- lib/mongo/crypt/encryption_io.rb
#initialize(client: nil, mongocryptd_client: nil, key_vault_namespace:, key_vault_client:, metadata_client:, mongocryptd_options: {}) ⇒ EncryptionIO
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Note:
When being used for auto encryption, all arguments are required. When being used for explicit encryption, only the key_vault_namespace and key_vault_client arguments are required.
Note:
This class expects that the key_vault_client and key_vault_namespace options are not nil and are in the correct format.
Creates a new EncryptionIO object with information about how to connect to the key vault.
57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/mongo/crypt/encryption_io.rb', line 57 def initialize( client: nil, mongocryptd_client: nil, key_vault_namespace:, key_vault_client:, metadata_client:, mongocryptd_options: {} ) validate_key_vault_client!(key_vault_client) validate_key_vault_namespace!(key_vault_namespace) @client = client @mongocryptd_client = mongocryptd_client @key_vault_db_name, @key_vault_collection_name = key_vault_namespace.split('.') @key_vault_client = key_vault_client = = end |