Class: DataDrain::Configuration
- Inherits:
-
Object
- Object
- DataDrain::Configuration
- Defined in:
- lib/data_drain/configuration.rb
Overview
Contenedor para todas las opciones de configuración del motor DataDrain.
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_region ⇒ Object
Returns the value of attribute aws_region.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#batch_size ⇒ Object
Returns the value of attribute batch_size.
-
#db_host ⇒ Object
Returns the value of attribute db_host.
-
#db_name ⇒ Object
Returns the value of attribute db_name.
-
#db_pass ⇒ Object
Returns the value of attribute db_pass.
-
#db_port ⇒ Object
Returns the value of attribute db_port.
-
#db_user ⇒ Object
Returns the value of attribute db_user.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#storage_mode ⇒ Object
Returns the value of attribute storage_mode.
-
#throttle_delay ⇒ Object
Returns the value of attribute throttle_delay.
Instance Method Summary collapse
-
#duckdb_connection_string ⇒ String
Cadena de conexión optimizada para DuckDB.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 |
# File 'lib/data_drain/configuration.rb', line 13 def initialize @storage_mode = :local @db_host = "127.0.0.1" @db_port = 5432 @batch_size = 5000 @throttle_delay = 0.5 @logger = Logger.new($stdout) end |
Instance Attribute Details
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def aws_access_key_id @aws_access_key_id end |
#aws_region ⇒ Object
Returns the value of attribute aws_region.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def aws_region @aws_region end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def aws_secret_access_key @aws_secret_access_key end |
#batch_size ⇒ Object
Returns the value of attribute batch_size.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def batch_size @batch_size end |
#db_host ⇒ Object
Returns the value of attribute db_host.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_host @db_host end |
#db_name ⇒ Object
Returns the value of attribute db_name.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_name @db_name end |
#db_pass ⇒ Object
Returns the value of attribute db_pass.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_pass @db_pass end |
#db_port ⇒ Object
Returns the value of attribute db_port.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_port @db_port end |
#db_user ⇒ Object
Returns the value of attribute db_user.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def db_user @db_user end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def logger @logger end |
#storage_mode ⇒ Object
Returns the value of attribute storage_mode.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def storage_mode @storage_mode end |
#throttle_delay ⇒ Object
Returns the value of attribute throttle_delay.
8 9 10 |
# File 'lib/data_drain/configuration.rb', line 8 def throttle_delay @throttle_delay end |
Instance Method Details
#duckdb_connection_string ⇒ String
Returns Cadena de conexión optimizada para DuckDB.
23 24 25 |
# File 'lib/data_drain/configuration.rb', line 23 def duckdb_connection_string "host=#{@db_host} port=#{@db_port} dbname=#{@db_name} user=#{@db_user} password=#{@db_pass}" end |