Class: Squirtgun::Gun
- Inherits:
-
Object
- Object
- Squirtgun::Gun
- Defined in:
- lib/squirtgun.rb
Overview
TODO: decide if this is a shitty name because its all Squirtgun::Squirtgun..
Instance Method Summary collapse
Instance Method Details
#report(options = {}) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/squirtgun.rb', line 25 def report(={}) return if [:context].nil? or [:value].nil? # TODO: add message format testing? Guzzler currenlty expects [context]:[value].. [:project_id] ||= Squirtgun::Config.project_id sock = UDPSocket.new sock.send({:stat => , :hmac => encode_packet([:context] + [:value], Squirtgun::Config.secret_key)}.to_json, 0, Squirtgun::Config.listener, Squirtgun::Config.listener_port) sock.close end |