Method: Fluent::Plugin::ElasticsearchInput#backend_options

Defined in:
lib/fluent/plugin/in_elasticsearch.rb

#backend_optionsObject



102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/fluent/plugin/in_elasticsearch.rb', line 102

def backend_options
  case @http_backend
  when :excon
    { client_key: @client_key, client_cert: @client_cert, client_key_pass: @client_key_pass }
  when :typhoeus
    require 'typhoeus'
    { sslkey: @client_key, sslcert: @client_cert, keypasswd: @client_key_pass }
  end
rescue LoadError => ex
  log.error_backtrace(ex.backtrace)
  raise Fluent::ConfigError, "You must install #{@http_backend} gem. Exception: #{ex}"
end