Class: FFWD::Plugin::JSON::LineConnection

Inherits:
Connection show all
Includes:
EM::Protocols::LineText2, Logging
Defined in:
lib/ffwd/plugin/json.rb

Constant Summary

Constants inherited from Connection

Connection::EVENT_FIELDS, Connection::METRIC_FIELDS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Logging

included, #log

Methods inherited from Connection

#initialize, #read_event, #read_metric, #read_tags, #read_time, #receive_json

Methods inherited from Connection

#datasink=, #send_data

Constructor Details

This class inherits a constructor from FFWD::Plugin::JSON::Connection

Class Method Details

.plugin_typeObject



57
58
59
# File 'lib/ffwd/plugin/json.rb', line 57

def self.plugin_type
  "json_line_in"
end

Instance Method Details

#receive_line(data) ⇒ Object



61
62
63
64
65
# File 'lib/ffwd/plugin/json.rb', line 61

def receive_line data
  receive_json data
rescue => e
  log.error "Failed to receive JSON: #{data}: #{e}"
end