Class: LogStash::Outputs::ElasticSearchJavaPlugins::Protocols::Base
- Inherits:
-
Object
- Object
- LogStash::Outputs::ElasticSearchJavaPlugins::Protocols::Base
- Defined in:
- lib/logstash/outputs/elasticsearch_java/protocol.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
- #template_install(name, template, force = false) ⇒ Object
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(={}) # 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 |