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 =
<<HELP
Usage: fluent-binlog-reader <command> [<args>]

Commands of fluent-binlog-reader:
   cat     :     Read files sequentially, writing them to standard output.
   head    :     Display the beginning of a text file.
   formats :     Display plugins that you can use.

See 'fluent-binlog-reader <command> --help' for more information on a specific command.
HELP

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