Skip to content

Commit

Permalink
move APIConfigs into PluginMixins namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
colinsurprenant committed Nov 20, 2020
1 parent 53dab0c commit 28144f8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/logstash/outputs/elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base

require "logstash/outputs/elasticsearch/http_client"
require "logstash/outputs/elasticsearch/http_client_builder"
require "logstash/outputs/elasticsearch/api_configs"
require "logstash/plugin_mixins/elasticsearch/api_configs"
require "logstash/outputs/elasticsearch/common"
require "logstash/outputs/elasticsearch/ilm"
require 'logstash/plugin_mixins/ecs_compatibility_support'
Expand All @@ -103,7 +103,7 @@ class LogStash::Outputs::ElasticSearch < LogStash::Outputs::Base
include(LogStash::PluginMixins::ECSCompatibilitySupport)

# Generic/API config options that any document indexer output needs
include(LogStash::Outputs::ElasticSearch::APIConfigs)
include(LogStash::PluginMixins::ElasticSearch::APIConfigs)

DEFAULT_POLICY = "logstash-policy"

Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/outputs/elasticsearch/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def setup_hosts

def hosts_default?(hosts)
# NOTE: would be nice if pipeline allowed us a clean way to detect a config default :
hosts.is_a?(Array) && hosts.size == 1 && hosts.first.equal?(APIConfigs::DEFAULT_HOST)
hosts.is_a?(Array) && hosts.size == 1 && hosts.first.equal?(LogStash::PluginMixins::ElasticSearch::APIConfigs::DEFAULT_HOST)
end
private :hosts_default?

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module LogStash; module Outputs; class ElasticSearch
module LogStash; module PluginMixins; module ElasticSearch
module APIConfigs

# This module defines common options that can be reused by alternate elasticsearch output plugins such as the elasticsearch_data_streams output.
Expand Down

0 comments on commit 28144f8

Please sign in to comment.