Class: StatsWhisper::Backend::StatsD
- Inherits:
-
Object
- Object
- StatsWhisper::Backend::StatsD
- Extended by:
- Forwardable
- Defined in:
- lib/stats_whisper/backend/statsd.rb
Instance Method Summary collapse
- #hostname ⇒ Object
-
#initialize ⇒ StatsD
constructor
A new instance of StatsD.
- #port ⇒ Object
Constructor Details
#initialize ⇒ StatsD
Returns a new instance of StatsD.
11 12 13 |
# File 'lib/stats_whisper/backend/statsd.rb', line 11 def initialize @statsd = Statsd.new(hostname, port) end |
Instance Method Details
#hostname ⇒ Object
15 16 17 |
# File 'lib/stats_whisper/backend/statsd.rb', line 15 def hostname ENV['STATSWHISPER_HOST'] || 'localhost' end |
#port ⇒ Object
19 20 21 |
# File 'lib/stats_whisper/backend/statsd.rb', line 19 def port ENV['STATSWHISPER_PORT'] || 8125 end |