Sha256: cd5d1b3a0c20f7efb67e25ea06d85c47fbeaa14da09e5f554694cbb4f8cae7f5
Contents?: true
Size: 645 Bytes
Versions: 4
Compression:
Stored size: 645 Bytes
Contents
require 'uuidtools' require_relative './es_http_client/client' require_relative './es_http_client/connection' require_relative './es_http_client/es_http_client_error' module EsHttpClient module ExpectedVersion Any = -2 NoStream = -1 EmptyStream = -1 end def self.connect(endpoint, username, password) Client.new(Connection.new(endpoint, username, password)) end 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 end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
es-http-client-0.2.0 | lib/es_http_client.rb |
es-http-client-0.1.2 | lib/es_http_client.rb |
es-http-client-0.1.1 | lib/es_http_client.rb |
es-http-client-0.1.0 | lib/es_http_client.rb |