Sha256: 4d840f3428d15200268281c90b970c66bf66c107e290ffbbc11da7fc8aae1801

Contents?: true

Size: 609 Bytes

Versions: 59

Compression:

Stored size: 609 Bytes

Contents

# encoding: utf-8
require_relative "elasticsearch_resource"

module LogStash module Modules class ElasticsearchConfig
  attr_reader :index_name

  # We name it `modul` here because `module` has meaning in Ruby.
  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

  def resources
    [ElasticsearchResource.new(@index_name, "not-used", @full_path)]
  end
end end end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
logstash-core-7.5.0-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-6.8.5-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.4.2-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-6.8.4-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.4.1-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.4.0-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.3.2-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-6.8.3-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.3.1-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.3.0-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-6.8.2-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.2.1-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.2.0-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-6.8.1-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.1.1-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.1.0-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-6.8.0-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-6.7.2-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.0.1-java lib/logstash/modules/elasticsearch_config.rb
logstash-core-7.0.0-java lib/logstash/modules/elasticsearch_config.rb