Plugin Helper: Event Loop
require 'fluent/plugin/input'
module Fluent::Plugin
class ExampleInput < Input
Fluent::Plugin.register_input('example', self)
# 1. Load `event_loop_helper`
helpers :event_loop
# Omit `configure`, `shutdown` and other plugin APIs
def start
super
# 2. Attach watcher
watcher = Coolio::TCPServer.new(...)
event_loop_attach(watcher)
end
end
endMethods
event_loop_attach(watcher)
event_loop_attach(watcher)Plugins using event_loop
event_loopLast updated
Was this helpful?