Module: Opentsdb

Defined in:
lib/opentsdb.rb,
lib/opentsdb/client.rb,
lib/opentsdb/version.rb,
lib/opentsdb/http_client.rb,
lib/opentsdb/query_parser.rb

Overview

:nodoc:

Defined Under Namespace

Classes: Client, HttpClient, QueryParser

Constant Summary collapse

VERSION =
'0.0.2'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.hostObject

Returns the value of attribute host.



5
6
7
# File 'lib/opentsdb.rb', line 5

def host
  @host
end

.portObject

Returns the value of attribute port.



5
6
7
# File 'lib/opentsdb.rb', line 5

def port
  @port
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Opentsdb)

    the object that the method was called on



7
8
9
# File 'lib/opentsdb.rb', line 7

def configure
  yield self
end

.loggerObject



24
25
26
27
28
# File 'lib/opentsdb.rb', line 24

def logger
  @logger ||= begin
    Logger.new(STDOUT).tap { |logger| logger.datetime_format = '%Y-%m-%d %H:%M:%S' }
  end
end

.resetObject



19
20
21
22
# File 'lib/opentsdb.rb', line 19

def reset
  @host = nil
  @port = nil
end