module EsHttpClient
Public Class Methods
connect(endpoint, username, password)
click to toggle source
# File lib/es_http_client.rb, line 14 def self.connect(endpoint, username, password) Client.new(Connection.new(endpoint, username, password)) end
create_event(type, data)
click to toggle source
# File lib/es_http_client.rb, line 18 def self.create_event(type, data) id = UUIDTools::UUID.random_create.to_s timestamp = Time.now.strftime('%FT%T.%3N%:z') data = data.merge({ occurredAt: timestamp }) Event.new(id, type, data, timestamp, 0) end