Class: FluQ::Format::Msgpack
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Msgpack
constructor
Msgpack initializer.
Methods inherited from Base
Methods included from Mixins::Loggable
Constructor Details
#initialize ⇒ Msgpack
Msgpack initializer
16 17 18 19 |
# File 'lib/fluq/format/msgpack.rb', line 16 def initialize(*) super @buffer = MessagePack::Unpacker.new end |
Class Method Details
.to_event(raw) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/fluq/format/msgpack.rb', line 4 def self.to_event(raw) case raw when Hash FluQ::Event.new(raw) else logger.warn "buffer contained invalid event #{raw.inspect}" nil end end |