Class: Fluent::DetachProcessManager::Forwarder

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/process.rb

Instance Method Summary collapse

Constructor Details

#initialize(w) ⇒ Forwarder

Returns a new instance of Forwarder.



230
231
232
# File 'lib/fluent/process.rb', line 230

def initialize(w)
  @w = w
end

Instance Method Details

#emit(tag, es) ⇒ Object



234
235
236
237
238
# File 'lib/fluent/process.rb', line 234

def emit(tag, es)
  ms = es.to_msgpack_stream
  #[tag, ms].to_msgpack(@w)  # not thread safe
  @w.write [tag, ms].to_msgpack
end