Class: FluentBinlogReader

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/command/binlog_reader.rb

Constant Summary collapse

SUBCOMMAND =
%w(cat head formats)
HELP_TEXT =
"Usage: fluent-binlog-reader <command> [<args>]\n\nCommands of fluent-binlog-reader:\n   cat     :     Read files sequentially, writing them to standard output.\n   head    :     Display the beginning of a text file.\n   formats :     Display plugins that you can use.\n\nSee 'fluent-binlog-reader <command> --help' for more information on a specific command.\n"

Instance Method Summary collapse

Constructor Details

#initialize(argv = ARGV) ⇒ FluentBinlogReader

Returns a new instance of FluentBinlogReader.



40
41
42
# File 'lib/fluent/command/binlog_reader.rb', line 40

def initialize(argv = ARGV)
  @argv = argv
end

Instance Method Details

#callObject



44
45
46
47
# File 'lib/fluent/command/binlog_reader.rb', line 44

def call
  command_class = BinlogReaderCommand.const_get(command)
  command_class.new(@argv).call
end