class Fluent::Plugin::RouteOutput::Route

Public Class Methods

new(pattern, router, tag_modifier, copy) click to toggle source
# File lib/fluent/plugin/out_route.rb, line 85
def initialize(pattern, router, tag_modifier, copy)
  @router = router
  @pattern = Fluent::MatchPattern.create(pattern)
  @tag_modifier = tag_modifier
  @copy = copy
end

Public Instance Methods

copy?() click to toggle source
# File lib/fluent/plugin/out_route.rb, line 96
def copy?
  @copy
end
emit(tag, es) click to toggle source
# File lib/fluent/plugin/out_route.rb, line 100
def emit(tag, es)
  tag = @tag_modifier.call(tag)
  @router.emit_stream(tag, es)
end
match?(tag) click to toggle source
# File lib/fluent/plugin/out_route.rb, line 92
def match?(tag)
  @pattern.match(tag)
end