Class: Fluent::Plugin::GroongaInput::BaseInput
- Inherits:
-
Object
- Object
- Fluent::Plugin::GroongaInput::BaseInput
- Includes:
- Configurable
- Defined in:
- lib/fluent/plugin/in_groonga.rb
Constant Summary collapse
- DEFAULT_EMIT_COMMANDS =
[ "clearlock", "column_copy", "column_create", "column_remove", "column_rename", "config_delete", "config_set", "delete", "load", "lock_acquire", "lock_clear", "lock_release", "logical_table_remove", "object_remove", "plugin_register", "plugin_unregister", "register", "reindex", "table_copy", "table_create", "table_remove", "table_rename", "truncate", ]
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(command, params) ⇒ Object
-
#initialize(input_plugin) ⇒ BaseInput
constructor
A new instance of BaseInput.
- #log ⇒ Object
Constructor Details
#initialize(input_plugin) ⇒ BaseInput
Returns a new instance of BaseInput.
146 147 148 |
# File 'lib/fluent/plugin/in_groonga.rb', line 146 def initialize(input_plugin) @input_plugin = input_plugin end |
Instance Method Details
#configure(conf) ⇒ Object
150 151 152 153 154 155 |
# File 'lib/fluent/plugin/in_groonga.rb', line 150 def configure(conf) super @port ||= default_port @real_port ||= default_port end |
#emit(command, params) ⇒ Object
157 158 159 160 161 162 163 |
# File 'lib/fluent/plugin/in_groonga.rb', line 157 def emit(command, params) normalized_command = command.split(".")[0] return unless emit_command?(normalized_command) @input_plugin.router.emit("groonga.command.#{normalized_command}", Engine.now, params) end |
#log ⇒ Object
165 166 167 |
# File 'lib/fluent/plugin/in_groonga.rb', line 165 def log @input_plugin.log end |