Plugin Helper: Event Emitter
The event_emitter plugin helper introduces the router method to the plugin.
Here is an example:
require 'fluent/plugin/output'
module Fluent::Plugin
class RelabelOutput < Output
Fluent::Plugin.register_output('relabel', self)
helpers :event_emitter
def multi_workers_ready?
true
end
def process(tag, es)
router.emit_stream(tag, es)
end
end
endMethods
router
routerThis method returns a Fluent::EventRouter instance.
Code example:
Plugins using event_emitter
event_emitterAll input plugins
All filter plugins
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is an open-source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
Last updated
Was this helpful?