class Fluent::EventStream
Public Instance Methods
==(other)
click to toggle source
for tests
# File lib/fluent/event.rb, line 40 def ==(other) other.is_a?(EventStream) && self.to_msgpack_stream == other.to_msgpack_stream end
dup()
click to toggle source
dup does deep copy for event stream
# File lib/fluent/event.rb, line 26 def dup raise NotImplementedError, "DO NOT USE THIS CLASS directly." end
each(unapcker: nil, &block)
click to toggle source
# File lib/fluent/event.rb, line 52 def each(unapcker: nil, &block) raise NotImplementedError, "DO NOT USE THIS CLASS directly." end
empty?()
click to toggle source
# File lib/fluent/event.rb, line 35 def empty? size == 0 end
repeatable?()
click to toggle source
# File lib/fluent/event.rb, line 44 def repeatable? false end
size()
click to toggle source
# File lib/fluent/event.rb, line 30 def size raise NotImplementedError, "DO NOT USE THIS CLASS directly." end
Also aliased as: length
slice(index, num)
click to toggle source
# File lib/fluent/event.rb, line 48 def slice(index, num) raise NotImplementedError, "DO NOT USE THIS CLASS directly." end
to_compressed_msgpack_stream(time_int: false, packer: nil)
click to toggle source
# File lib/fluent/event.rb, line 65 def to_compressed_msgpack_stream(time_int: false, packer: nil) packed = to_msgpack_stream(time_int: time_int, packer: packer) compress(packed) end
to_msgpack_stream(time_int: false, packer: nil)
click to toggle source
# File lib/fluent/event.rb, line 56 def to_msgpack_stream(time_int: false, packer: nil) return to_msgpack_stream_forced_integer(packer: packer) if time_int out = packer || Fluent::MessagePackFactory.msgpack_packer each {|time,record| out.write([time,record]) } out.full_pack end
to_msgpack_stream_forced_integer(packer: nil)
click to toggle source
# File lib/fluent/event.rb, line 70 def to_msgpack_stream_forced_integer(packer: nil) out = packer || Fluent::MessagePackFactory.msgpack_packer each {|time,record| out.write([time.to_i,record]) } out.full_pack end