Module: Fflux
- Defined in:
- lib/fflux.rb,
lib/fflux/version.rb
Constant Summary collapse
- VERSION =
"0.2.0"- @@port =
8092- @@host =
'127.0.0.1'
Class Method Summary collapse
- .host=(host) ⇒ Object
- .port=(port) ⇒ Object
- .setup {|_self| ... } ⇒ Object
- .write(measurement, values = {}, tags = {}) ⇒ Object
Class Method Details
.host=(host) ⇒ Object
31 32 33 |
# File 'lib/fflux.rb', line 31 def host=(host) @@host = host end |
.port=(port) ⇒ Object
27 28 29 |
# File 'lib/fflux.rb', line 27 def port=(port) @@port = port end |
.setup {|_self| ... } ⇒ Object
23 24 25 |
# File 'lib/fflux.rb', line 23 def setup yield self end |
.write(measurement, values = {}, tags = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fflux.rb', line 11 def write(measurement, values = {}, = {}) Thread.new do socket = UDPSocket.new socket.send( payload(measurement, values, ), 0, @@host, @@port ) end end |