Module: Wukong::Source

Includes:
Plugin
Defined in:
lib/wukong/source.rb,
lib/wukong/source/source_driver.rb,
lib/wukong/source/source_runner.rb

Overview

Provides a runner for periodically triggering a dataflow or processor.

Defined Under Namespace

Classes: SourceDriver, SourceRunner

Class Method Summary collapse

Methods included from Plugin

included

Class Method Details

.boot(settings, root) ⇒ Object

Boots Wukong::Source using the given +settings+ at the given +root.

Parameters:

  • settings (Configliere::Param)

    the settings to use to boot

  • root (String)

    the root directory to boot in



27
28
# File 'lib/wukong/source.rb', line 27

def self.boot(settings, root)
end

.configure(settings, program) ⇒ Object

Configures the given +settings+ object with all settings specific to Wukong::Source for the given program +name+.

Parameters:

  • settings (Configliere::Param)

    the settings to configure

  • program (String)

    the name of the currently executing program



13
14
15
16
17
18
19
20
# File 'lib/wukong/source.rb', line 13

def self.configure settings, program
  case program
  when 'wu-source'
    settings.define :per_sec,    description: "Number of events produced per second", type: Float
    settings.define :period,     description: "Number of seconds between events (overrides --per_sec)", type: Float
    settings.define :batch_size, description: "Trigger a finalize across the dataflow each time this many records are processed", type: Integer
  end
end