Class: Fluent::Plugin::GrpcOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::Plugin::GrpcOutput
- Defined in:
- lib/fluent/plugin/out_grpc.rb
Instance Method Summary collapse
Instance Method Details
#start ⇒ Object
12 13 14 15 |
# File 'lib/fluent/plugin/out_grpc.rb', line 12 def start super @stub = Event::Forwarder::Stub.new(@path, :this_channel_is_insecure) end |
#write(chunk) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/fluent/plugin/out_grpc.rb', line 17 def write(chunk) chunk.each do |time, record| ack = @stub.forward(Event::Log.new(name: record['message'])) $stdout.puts ack.type end end |