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