lib/fluent/plugin/in_elasticsearch.rb in fluent-plugin-elasticsearch-5.1.5 vs lib/fluent/plugin/in_elasticsearch.rb in fluent-plugin-elasticsearch-5.2.0

- old
+ new

@@ -1,10 +1,11 @@ require 'elasticsearch' require 'fluent/log-ext' require 'fluent/plugin/input' require_relative 'elasticsearch_constants' +require_relative 'elasticsearch_compat' module Fluent::Plugin class ElasticsearchInput < Input class UnrecoverableRequestFailure < Fluent::UnrecoverableError; end @@ -216,10 +217,10 @@ local_reload_connections = @reload_after end headers = { 'Content-Type' => "application/json" }.merge(@custom_headers) - transport = Elasticsearch::Transport::Transport::HTTP::Faraday.new( + transport = TRANSPORT_CLASS::Transport::HTTP::Faraday.new( connection_options.merge( options: { reload_connections: local_reload_connections, reload_on_failure: @reload_on_failure, resurrect_after: @resurrect_after,