Sha256: 11024a35e6851e4d6079250014168b3a444df6472a523e203119645e8c7d2daf

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

RFlow::Configuration::RubyDSL.configure do |config|
  # Configure the settings, which include paths for various files, log
  # levels, and component specific stuffs
  config.setting('rflow.log_level', 'INFO')
  config.setting('rflow.application_directory_path', '.')

  # Instantiate components
  config.component 'http_server', 'HTTPServer', 'port' => 8080
  config.component 'filter', 'RFlow::Components::RubyProcFilter', 'filter_proc_string' => 'message.data.path == "/awesome"'
  config.component 'replicate', 'RFlow::Components::Replicate'
  config.component 'file_output', 'RFlow::Components::FileOutput', 'output_file_path' => '/tmp/http_crap'
  config.component 'http_responder', 'HTTPResponder', 'response_code' => 200, 'content' => 'Hi, this teh awesome'

#  config.connect 'http_server#request_port' => 'filter#in'
#  config.connect 'filter#filtered' => 'replicate#in'
  config.connect 'http_server#request_port' => 'replicate#in'
  config.connect 'replicate#out[1]' => 'file_output#in'
  config.connect 'replicate#out[2]' => 'http_responder#request'
  config.connect 'http_responder#response' => 'http_server#response_port'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rflow-1.0.0a1 example/http_config.rb