Module: Wukong

Extended by:
Hanuman::Shortcuts
Defined in:
lib/wukong.rb,
lib/wukong.rb,
lib/wukong/local.rb,
lib/wukong/driver.rb,
lib/wukong/logger.rb,
lib/wukong/plugin.rb,
lib/wukong/runner.rb,
lib/wukong/source.rb,
lib/wukong/version.rb,
lib/wu/geo/quadtile.rb,
lib/wukong/dataflow.rb,
lib/wukong/processor.rb,
lib/wu/geo/geolocated.rb,
lib/wukong/doc_helpers.rb,
lib/wukong/widget/echo.rb,
lib/wukong/local/runner.rb,
lib/wukong/spec_helpers.rb,
lib/wukong/widget/utils.rb,
lib/wukong/driver/wiring.rb,
lib/wukong/widget/logger.rb,
lib/wukong/widget/extract.rb,
lib/wukong/widget/filters.rb,
lib/wukong/widget/operators.rb,
lib/wukong/local/stdio_driver.rb,
lib/wukong/runner/code_loader.rb,
lib/wukong/widget/serializers.rb,
lib/wukong/runner/help_message.rb,
lib/wukong/widget/reducers/bin.rb,
lib/wukong/runner/boot_sequence.rb,
lib/wukong/source/source_driver.rb,
lib/wukong/source/source_runner.rb,
lib/wukong/widget/reducers/sort.rb,
lib/wukong/widget/reducers/uniq.rb,
lib/wukong/runner/command_runner.rb,
lib/wukong/widget/reducers/count.rb,
lib/wukong/widget/reducers/group.rb,
lib/wukong/spec_helpers/unit_tests.rb,
lib/wukong/widget/reducers/moments.rb,
lib/wukong/widget/reducers/improver.rb,
lib/wukong/widget/reducers/join_xml.rb,
lib/wukong/doc_helpers/field_handler.rb,
lib/wukong/runner/deploy_pack_loader.rb,
lib/wukong/model/flatpack_parser/flat.rb,
lib/wukong/model/flatpack_parser/lang.rb,
lib/wukong/driver/event_machine_driver.rb,
lib/wukong/widget/reducers/accumulator.rb,
lib/wukong/doc_helpers/dataflow_handler.rb,
lib/wukong/model/flatpack_parser/parser.rb,
lib/wukong/model/flatpack_parser/tokens.rb,
lib/wukong/widget/reducers/group_concat.rb,
lib/wukong/doc_helpers/processor_handler.rb,
lib/wukong/spec_helpers/integration_tests.rb,
lib/wukong/spec_helpers/unit_tests/unit_test_driver.rb,
lib/wukong/spec_helpers/unit_tests/unit_test_runner.rb,
lib/wukong/spec_helpers/unit_tests/unit_test_matchers.rb,
lib/wukong/spec_helpers/integration_tests/integration_test_runner.rb,
lib/wukong/spec_helpers/integration_tests/integration_test_matchers.rb,
lib/wukong/model/faker.rb

Overview

The Wukong module will contain all code for Wukong's core (like Processors and Dataflows) as well as all plugins.

Plugins are expected to own their own namespace within Wukong, e.g. - Wukong::Hadoop, Wukong::Storm, &c.

Defined Under Namespace

Modules: DocHelpers, DriverMethods, DynamicGet, EventMachineDriver, Faker, FlatPack, Geo, Geolocated, Local, Logging, Plugin, Source, SpecHelpers, Universe, Widget Classes: Dataflow, DataflowBuilder, Error, LogFactory, Processor, ProcessorBuilder, Runner, Wiring

Constant Summary collapse

BUILTINS =

Built-in Wukong processors and dataflows.

Set.new(Wukong.registry.show.keys)
Log =

Default log. Parent to all logs created in Wukong namespace

LogFactory.configure(Wukong)
PLUGINS =

An array of known plugins.

[]
VERSION =
'4.0.0'

Class Method Summary collapse

Methods included from Hanuman::Shortcuts

add_shortcut_method_for, builder_shortcut, registry

Class Method Details

.boot_plugins(settings, root) ⇒ Object

Asks each loaded plugin to boot itself from the given +settings+ in the given +root+ directory.

Parameters:

  • settings (Configliere::Param)

    the settings for each plugin to boot from

  • root (String)

    the root directory the plugins are booting in



22
23
24
25
26
# File 'lib/wukong/plugin.rb', line 22

def self.boot_plugins(settings, root)
  PLUGINS.each do |plugin|
    plugin.boot(settings, root) if plugin.respond_to?(:boot)
  end
end

.configure_plugins(settings, program_name) ⇒ Object

Asks each loaded plugin to configure the given +settings+ for the given +program_name+.

Parameters:

  • settings (Configliere::Param)

    the settings to be configured by each plugin

  • program_name (String)

    the name of the currently executing program



11
12
13
14
15
# File 'lib/wukong/plugin.rb', line 11

def self.configure_plugins(settings, program_name)
  PLUGINS.each do |plugin|
    plugin.configure(settings, program_name) if plugin.respond_to?(:configure)
  end
end

.doc_helpers_pathObject



38
39
40
# File 'lib/wukong.rb', line 38

def self.doc_helpers_path
  File.expand_path('../wukong/doc_helpers.rb', __FILE__)
end