Class: GroongaDelta::ImportConfig::MySQL
- Inherits:
-
Object
- Object
- GroongaDelta::ImportConfig::MySQL
- Includes:
- Config::PathResolvable
- Defined in:
- lib/groonga-delta/import-config.rb
Instance Method Summary collapse
- #binlog_dir ⇒ Object
- #checksum ⇒ Object
- #host ⇒ Object
- #initial_import_batch_size ⇒ Object
-
#initialize(dir, data, secret_data) ⇒ MySQL
constructor
A new instance of MySQL.
- #password ⇒ Object
- #port ⇒ Object
- #replication_client ⇒ Object
- #replication_client_password ⇒ Object
- #replication_client_user ⇒ Object
- #replication_slave ⇒ Object
- #replication_slave_password ⇒ Object
- #replication_slave_user ⇒ Object
- #select ⇒ Object
- #select_password ⇒ Object
- #select_user ⇒ Object
- #socket ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(dir, data, secret_data) ⇒ MySQL
Returns a new instance of MySQL.
52 53 54 55 56 |
# File 'lib/groonga-delta/import-config.rb', line 52 def initialize(dir, data, secret_data) @dir = dir @data = data @secret_data = secret_data end |
Instance Method Details
#binlog_dir ⇒ Object
58 59 60 |
# File 'lib/groonga-delta/import-config.rb', line 58 def binlog_dir resolve_path(@data["binlog_dir"] || "binlog") end |
#checksum ⇒ Object
121 122 123 124 125 |
# File 'lib/groonga-delta/import-config.rb', line 121 def checksum _checksum = @data["checksum"] return nil if _checksum.nil? _checksum.to_sym end |
#host ⇒ Object
62 63 64 |
# File 'lib/groonga-delta/import-config.rb', line 62 def host @data["host"] || "localhost" end |
#initial_import_batch_size ⇒ Object
127 128 129 |
# File 'lib/groonga-delta/import-config.rb', line 127 def initial_import_batch_size resolve_size(@data["initial_import_batch_size"] || 1024 * 1024) end |
#password ⇒ Object
78 79 80 |
# File 'lib/groonga-delta/import-config.rb', line 78 def password @secret_data["password"] || @data["password"] end |
#port ⇒ Object
66 67 68 |
# File 'lib/groonga-delta/import-config.rb', line 66 def port @data["port"] || 3306 end |
#replication_client ⇒ Object
82 83 84 |
# File 'lib/groonga-delta/import-config.rb', line 82 def replication_client @data["replication_client"] || @data end |
#replication_client_password ⇒ Object
90 91 92 93 |
# File 'lib/groonga-delta/import-config.rb', line 90 def replication_client_password (@secret_data["replication_client"] || @secret_data)["password"] || replication_client["password"] end |
#replication_client_user ⇒ Object
86 87 88 |
# File 'lib/groonga-delta/import-config.rb', line 86 def replication_client_user replication_client["user"] end |
#replication_slave ⇒ Object
95 96 97 |
# File 'lib/groonga-delta/import-config.rb', line 95 def replication_slave @data["replication_slave"] || @data end |
#replication_slave_password ⇒ Object
103 104 105 106 |
# File 'lib/groonga-delta/import-config.rb', line 103 def replication_slave_password (@secret_data["replication_slave"] || @secret_data)["password"] || replication_slave["password"] end |
#replication_slave_user ⇒ Object
99 100 101 |
# File 'lib/groonga-delta/import-config.rb', line 99 def replication_slave_user replication_slave["user"] end |
#select ⇒ Object
108 109 110 |
# File 'lib/groonga-delta/import-config.rb', line 108 def select @data["select"] || @data end |
#select_password ⇒ Object
116 117 118 119 |
# File 'lib/groonga-delta/import-config.rb', line 116 def select_password (@secret_data["select"] || @secret_data)["password"] || select["password"] end |
#select_user ⇒ Object
112 113 114 |
# File 'lib/groonga-delta/import-config.rb', line 112 def select_user select["user"] end |
#socket ⇒ Object
70 71 72 |
# File 'lib/groonga-delta/import-config.rb', line 70 def socket @data["socket"] end |
#user ⇒ Object
74 75 76 |
# File 'lib/groonga-delta/import-config.rb', line 74 def user @data["user"] end |