Class: GroongaDelta::ImportConfig

Inherits:
Config
  • Object
show all
Defined in:
lib/groonga-delta/import-config.rb

Defined Under Namespace

Classes: Local, MySQL, Vacuum

Instance Method Summary collapse

Methods inherited from Config

#log_age, #log_level, #log_max_size, #log_path, #log_period_suffix, #logger, #polling_interval

Constructor Details

#initialize(dir) ⇒ ImportConfig

Returns a new instance of ImportConfig.



21
22
23
# File 'lib/groonga-delta/import-config.rb', line 21

def initialize(dir)
  super("groonga-delta-import", dir)
end

Instance Method Details

#delta_dirObject



25
26
27
# File 'lib/groonga-delta/import-config.rb', line 25

def delta_dir
  resolve_path(@data["delta_dir"] || "delta")
end

#localObject



36
37
38
39
# File 'lib/groonga-delta/import-config.rb', line 36

def local
  return nil unless @data["local"]
  Local.new(@dir, @data["local"])
end

#mappingObject



45
46
47
# File 'lib/groonga-delta/import-config.rb', line 45

def mapping
  Mapping.new(@data["mapping"] || {})
end

#mysqlObject



29
30
31
32
33
34
# File 'lib/groonga-delta/import-config.rb', line 29

def mysql
  return nil unless @data["mysql"]
  MySQL.new(@dir,
            @data["mysql"],
            @secret_data["mysql"] || {})
end

#vacuumObject



41
42
43
# File 'lib/groonga-delta/import-config.rb', line 41

def vacuum
  Vacuum.new(@data["vacuum"] || {})
end