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.
8 9 10 11 12 13 14 |
# File 'lib/logstash/modules/elasticsearch_config.rb', line 8 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.
5 6 7 |
# File 'lib/logstash/modules/elasticsearch_config.rb', line 5 def index_name @index_name end |
Instance Method Details
#resources ⇒ Object
16 17 18 |
# File 'lib/logstash/modules/elasticsearch_config.rb', line 16 def resources [ElasticsearchResource.new(@index_name, "not-used", @full_path)] end |