Class: Riddle::Configuration::Searchd

Inherits:
Section
  • Object
show all
Defined in:
lib/riddle/configuration/searchd.rb,
lib/riddle/0.9.9/configuration/searchd.rb

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) mysql41

Returns the value of attribute mysql41



21
22
23
# File 'lib/riddle/configuration/searchd.rb', line 21

def mysql41
  @mysql41
end

Class Method Details

+ (Object) settings



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/riddle/configuration/searchd.rb', line 4

def self.settings
  [
    :listen, :address, :port, :log, :query_log,
    :query_log_format, :read_timeout, :client_timeout, :max_children,
    :pid_file, :max_matches, :seamless_rotate, :preopen_indexes,
    :unlink_old, :attr_flush_period, :ondisk_dict_default, :max_packet_size,
    :mva_updates_pool, :crash_log_path, :max_filters, :max_filter_values,
    :listen_backlog, :read_buffer, :read_unhinted, :max_batch_queries,
    :subtree_docs_cache, :subtree_hits_cache, :workers, :dist_threads,
    :binlog_path, :binlog_flush, :binlog_max_log_size, :collation_server,
    :collation_libc_locale, :plugin_dir, :mysql_version_string,
    :rt_flush_period, :thread_stack, :expansion_limit,
  :compat_sphinxql_magics, :watchdog, :client_key
  ]
end

Instance Method Details

- (Object) render

Raises:



23
24
25
26
27
28
29
30
31
# File 'lib/riddle/configuration/searchd.rb', line 23

def render
  raise ConfigurationError unless valid?
  
  (
    ["searchd", "{"] +
    settings_body +
    ["}", ""]
  ).join("\n")
end

- (Boolean) valid?

Returns:

  • (Boolean)


33
34
35
36
37
38
# File 'lib/riddle/configuration/searchd.rb', line 33

def valid?
  set_listen
  clear_deprecated

  !( @listen.nil? || @listen.empty? || @pid_file.nil? )
end