Class: LogStash::Outputs::ElasticSearchJavaPlugins::Protocols::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/outputs/elasticsearch_java/protocol.rb

Direct Known Subclasses

NodeClient

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



12
13
14
15
# File 'lib/logstash/outputs/elasticsearch_java/protocol.rb', line 12

def initialize(options={})
  # host(s), port, cluster
  @logger = Cabin::Channel.get
end

Instance Method Details

#template_install(name, template, force = false) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/logstash/outputs/elasticsearch_java/protocol.rb', line 17

def template_install(name, template, force=false)
  if template_exists?(name) && !force
    @logger.debug("Found existing Elasticsearch template. Skipping template management", :name => name)
    return
  end
  template_put(name, template)
end