class Fluent::EventStream
Public Instance Methods
==(other)
click to toggle source
for tests
# File lib/fluent/event.rb, line 41 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 27 def dup raise NotImplementedError, "DO NOT USE THIS CLASS directly." end
each(&block)
click to toggle source
# File lib/fluent/event.rb, line 53 def each(&block) raise NotImplementedError, "DO NOT USE THIS CLASS directly." end
empty?()
click to toggle source
# File lib/fluent/event.rb, line 36 def empty? size == 0 end
repeatable?()
click to toggle source
# File lib/fluent/event.rb, line 45 def repeatable? false end
size()
click to toggle source
# File lib/fluent/event.rb, line 31 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 49 def slice(index, num) raise NotImplementedError, "DO NOT USE THIS CLASS directly." end
to_compressed_msgpack_stream(time_int: false)
click to toggle source
# File lib/fluent/event.rb, line 66 def to_compressed_msgpack_stream(time_int: false) packed = to_msgpack_stream(time_int: time_int) compress(packed) end
to_msgpack_stream(time_int: false)
click to toggle source
# File lib/fluent/event.rb, line 57 def to_msgpack_stream(time_int: false) return to_msgpack_stream_forced_integer if time_int out = msgpack_packer each {|time,record| out.write([time,record]) } out.to_s end
to_msgpack_stream_forced_integer()
click to toggle source
# File lib/fluent/event.rb, line 71 def to_msgpack_stream_forced_integer out = msgpack_packer each {|time,record| out.write([time.to_i,record]) } out.to_s end