Class: LogStash::Config::Source::Base
- Inherits:
-
Object
- Object
- LogStash::Config::Source::Base
- Defined in:
- lib/logstash/config/source/base.rb
Instance Attribute Summary collapse
-
#conflict_messages ⇒ Object
readonly
Returns the value of attribute conflict_messages.
Instance Method Summary collapse
- #both_module_configs? ⇒ Boolean
- #config_conflict? ⇒ Boolean
- #config_path ⇒ Object
- #config_path? ⇒ Boolean
- #config_path_setting ⇒ Object
- #config_reload_automatic ⇒ Object
- #config_reload_automatic? ⇒ Boolean
- #config_reload_automatic_setting ⇒ Object
- #config_string ⇒ Object
- #config_string? ⇒ Boolean
- #config_string_setting ⇒ Object
-
#initialize(settings) ⇒ Base
constructor
A new instance of Base.
- #match? ⇒ Boolean
- #modules ⇒ Object
- #modules? ⇒ Boolean
- #modules_cli ⇒ Object
- #modules_cli? ⇒ Boolean
- #modules_cli_setting ⇒ Object
- #modules_defined? ⇒ Boolean
- #modules_setting ⇒ Object
- #pipeline_configs ⇒ Object
Constructor Details
#initialize(settings) ⇒ Base
Returns a new instance of Base.
6 7 8 9 |
# File 'lib/logstash/config/source/base.rb', line 6 def initialize(settings) @settings = settings @conflict_messages = [] end |
Instance Attribute Details
#conflict_messages ⇒ Object (readonly)
Returns the value of attribute conflict_messages.
4 5 6 |
# File 'lib/logstash/config/source/base.rb', line 4 def @conflict_messages end |
Instance Method Details
#both_module_configs? ⇒ Boolean
83 84 85 |
# File 'lib/logstash/config/source/base.rb', line 83 def both_module_configs? modules_cli? && modules? end |
#config_conflict? ⇒ Boolean
19 20 21 |
# File 'lib/logstash/config/source/base.rb', line 19 def config_conflict? raise NotImplementedError, "`config_conflict?` must be implemented!" end |
#config_path ⇒ Object
51 52 53 |
# File 'lib/logstash/config/source/base.rb', line 51 def config_path config_path_setting.value end |
#config_path? ⇒ Boolean
55 56 57 |
# File 'lib/logstash/config/source/base.rb', line 55 def config_path? !(config_path.nil? || config_path.empty?) end |
#config_path_setting ⇒ Object
47 48 49 |
# File 'lib/logstash/config/source/base.rb', line 47 def config_path_setting @settings.get_setting("path.config") end |
#config_reload_automatic ⇒ Object
27 28 29 |
# File 'lib/logstash/config/source/base.rb', line 27 def config_reload_automatic config_reload_automatic_setting.value end |
#config_reload_automatic? ⇒ Boolean
31 32 33 |
# File 'lib/logstash/config/source/base.rb', line 31 def config_reload_automatic? config_reload_automatic_setting.set? end |
#config_reload_automatic_setting ⇒ Object
23 24 25 |
# File 'lib/logstash/config/source/base.rb', line 23 def config_reload_automatic_setting @settings.get_setting("config.reload.automatic") end |
#config_string ⇒ Object
39 40 41 |
# File 'lib/logstash/config/source/base.rb', line 39 def config_string config_string_setting.value end |
#config_string? ⇒ Boolean
43 44 45 |
# File 'lib/logstash/config/source/base.rb', line 43 def config_string? !config_string.nil? end |
#config_string_setting ⇒ Object
35 36 37 |
# File 'lib/logstash/config/source/base.rb', line 35 def config_string_setting @settings.get_setting("config.string") end |
#match? ⇒ Boolean
15 16 17 |
# File 'lib/logstash/config/source/base.rb', line 15 def match? raise NotImplementedError, "`match?` must be implemented!" end |
#modules ⇒ Object
75 76 77 |
# File 'lib/logstash/config/source/base.rb', line 75 def modules modules_setting.value end |
#modules? ⇒ Boolean
79 80 81 |
# File 'lib/logstash/config/source/base.rb', line 79 def modules? !(modules.nil? || modules.empty?) end |
#modules_cli ⇒ Object
63 64 65 |
# File 'lib/logstash/config/source/base.rb', line 63 def modules_cli modules_cli_setting.value end |
#modules_cli? ⇒ Boolean
67 68 69 |
# File 'lib/logstash/config/source/base.rb', line 67 def modules_cli? !(modules_cli.nil? || modules_cli.empty?) end |
#modules_cli_setting ⇒ Object
59 60 61 |
# File 'lib/logstash/config/source/base.rb', line 59 def modules_cli_setting @settings.get_setting("modules.cli") end |
#modules_defined? ⇒ Boolean
87 88 89 |
# File 'lib/logstash/config/source/base.rb', line 87 def modules_defined? modules_cli? || modules? end |
#modules_setting ⇒ Object
71 72 73 |
# File 'lib/logstash/config/source/base.rb', line 71 def modules_setting @settings.get_setting("modules") end |
#pipeline_configs ⇒ Object
11 12 13 |
# File 'lib/logstash/config/source/base.rb', line 11 def pipeline_configs raise NotImplementedError, "`#pipeline_configs` must be implemented!" end |