Class: Fluent::Plugin::GroongaInput::BaseInput

Inherits:
Object
  • Object
show all
Includes:
Configurable
Defined in:
lib/fluent/plugin/in_groonga.rb

Direct Known Subclasses

GQTPInput, HTTPInput

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

Constructor Details

#initialize(input_plugin) ⇒ BaseInput

Returns a new instance of BaseInput.



159
160
161
# File 'lib/fluent/plugin/in_groonga.rb', line 159

def initialize(input_plugin)
  @input_plugin = input_plugin
end

Instance Method Details

#configure(conf) ⇒ Object



163
164
165
166
167
168
# File 'lib/fluent/plugin/in_groonga.rb', line 163

def configure(conf)
  super

  @port ||= default_port
  @real_port ||= default_port
end

#emit(command, params) ⇒ Object



170
171
172
173
174
175
176
# File 'lib/fluent/plugin/in_groonga.rb', line 170

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

#logObject



178
179
180
# File 'lib/fluent/plugin/in_groonga.rb', line 178

def log
  @input_plugin.log
end