Class: LogStash::Modules::ElasticsearchConfig
- Inherits:
-
Object
- Object
- LogStash::Modules::ElasticsearchConfig
- Defined in:
- lib/logstash/modules/elasticsearch_config.rb
Instance Attribute Summary collapse
-
#index_name ⇒ Object
readonly
Returns the value of attribute index_name.
Instance Method Summary collapse
-
#initialize(modul, settings) ⇒ ElasticsearchConfig
constructor
We name it ‘modul` here because `module` has meaning in Ruby.
- #resources ⇒ Object
Constructor Details
#initialize(modul, settings) ⇒ ElasticsearchConfig
We name it ‘modul` here because `module` has meaning in Ruby.
11 12 13 14 15 16 17 |
# File 'lib/logstash/modules/elasticsearch_config.rb', line 11 def initialize(modul, settings) @directory = ::File.join(modul.directory, "elasticsearch") @name = modul.module_name @settings = settings @full_path = ::File.join(@directory, "#{@name}.json") @index_name = @settings.fetch("elasticsearch.template_path", "_template") end |
Instance Attribute Details
#index_name ⇒ Object (readonly)
Returns the value of attribute index_name.
8 9 10 |
# File 'lib/logstash/modules/elasticsearch_config.rb', line 8 def index_name @index_name end |
Instance Method Details
#resources ⇒ Object
19 20 21 |
# File 'lib/logstash/modules/elasticsearch_config.rb', line 19 def resources [ElasticsearchResource.new(@index_name, "not-used", @full_path)] end |