Class: LogStash::Outputs::Elasticsearch::Protocols::Base
- Inherits:
-
Object
- Object
- LogStash::Outputs::Elasticsearch::Protocols::Base
- Defined in:
- lib/logstash/outputs/elasticsearch/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.
9 10 11 12 |
# File 'lib/logstash/outputs/elasticsearch/protocol.rb', line 9 def initialize(={}) # host(s), port, cluster @logger = Cabin::Channel.get end |
Instance Method Details
#template_install(name, template, force = false) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/logstash/outputs/elasticsearch/protocol.rb', line 21 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 |