Class: FluQ::Feed::Msgpack
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
Methods included from Mixins::Loggable
Constructor Details
This class inherits a constructor from FluQ::Feed::Base
Class Method Details
.to_event(raw) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/fluq/feed/msgpack.rb', line 4 def self.to_event(raw) raw = MessagePack.unpack(raw) if raw.is_a?(String) case raw when Hash FluQ::Event.new raw.delete("="), raw.delete("@"), raw else logger.warn "buffer contained invalid event #{raw.inspect}" nil end end |