Module: HostedGraphite
- Extended by:
- Forwardable
- Defined in:
- lib/hosted_graphite/http.rb,
lib/hosted_graphite.rb,
lib/hosted_graphite/tcp.rb,
lib/hosted_graphite/udp.rb,
lib/hosted_graphite/statsd.rb,
lib/hosted_graphite/testing.rb,
lib/hosted_graphite/version.rb,
lib/hosted_graphite/protocol.rb
Overview
ANALYSE, is this implementation thread safe ?
Defined Under Namespace
Classes: HTTP, MissingAPIKey, Protocol, StatsD, TCP, UDP
Constant Summary
collapse
- VERSION =
'0.0.8'
- @@api_key =
SecureRandom.hex
- @@protocol =
nil
- @@statsd =
StatsD.new
Class Method Summary
collapse
Class Method Details
.api_key ⇒ Object
22
23
24
|
# File 'lib/hosted_graphite.rb', line 22
def api_key
@@api_key
end
|
.api_key=(key) ⇒ Object
26
27
28
|
# File 'lib/hosted_graphite.rb', line 26
def api_key=(key)
@@api_key = key
end
|
.protocol ⇒ Object
30
31
32
|
# File 'lib/hosted_graphite.rb', line 30
def protocol
@@protocol
end
|
.protocol=(protocol) ⇒ Object
34
35
36
37
38
39
40
41
42
|
# File 'lib/hosted_graphite.rb', line 34
def protocol=(protocol)
case protocol
when Class
@@protocol = protocol.new
when String, Symbol
protocol = protocol.to_s.upcase
@@protocol = const_get(protocol).new
end
end
|
.send_metric ⇒ Object
.testing ⇒ Object
Also known as:
increment, decrement, count, gauge, set, timing, time
17
18
19
|
# File 'lib/hosted_graphite/testing.rb', line 17
def testing(*)
yield if block_given?
end
|