Fluent::Input
# File lib/fluent/plugin/in_config_expander.rb, line 14 def builtin_mapping {'__hostname__' => @hostname, '__HOSTNAME__' => @hostname, '${hostname}' => @hostname, '${HOSTNAME}' => @hostname} end
# File lib/fluent/plugin/in_config_expander.rb, line 25 def configure(conf) super configs = conf.elements.select{|e| e.name == 'config'} if configs.size != 1 raise Fluent::ConfigError, "config_expander needs just one <config> ... </config> section" end ex = expand_config(configs.first) @plugin = Fluent::Plugin.new_input(ex['type']) @plugin.configure(ex) mark_used(configs.first) end
# File lib/fluent/plugin/in_config_expander.rb, line 18 def expand_config(conf) ex = Fluent::Config::Expander.expand(conf, builtin_mapping()) ex.name = '' ex.arg = '' ex end
# File lib/fluent/plugin/in_config_expander.rb, line 9 def mark_used(conf) conf.used = conf.keys conf.elements.each{|e| mark_used(e)} end
Generated with the Darkfish Rdoc Generator 2.