Class: SensuCli::Client::Socket
- Inherits:
-
Object
- Object
- SensuCli::Client::Socket
- Defined in:
- lib/sensu-cli/client/socket.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/sensu-cli/client/socket.rb', line 7 def @message end |
Instance Method Details
#format_message(data) ⇒ Object
15 16 17 |
# File 'lib/sensu-cli/client/socket.rb', line 15 def (data) self. = { 'name' => data[:name], 'output' => data[:output], 'status' => data[:status] }.to_json end |
#send_udp_message ⇒ Object
9 10 11 12 13 |
# File 'lib/sensu-cli/client/socket.rb', line 9 def udp = UDPSocket.new udp.send(, 0, '127.0.0.1', 3030) puts 'UDP Socket Message Sent' end |