module Estool::Connections
Public Class Methods
start_conn(host,port)
click to toggle source
# File lib/estool/connections.rb, line 7 def self.start_conn(host,port) Elasticsearch::Client.new host: "#{host}:#{port}" end
test_conn(client)
click to toggle source
# File lib/estool/connections.rb, line 11 def self.test_conn(client) client.perform_request 'GET', '_cluster/health' rescue Faraday::ConnectionFailed => connfail # Connection Failure Message puts connfail exit 1 end