Module: FFWD::Plugin::JsonLine

Includes:
Logging, FFWD::Plugin
Defined in:
lib/ffwd/plugin/json_line.rb,
lib/ffwd/plugin/json_line/connection.rb

Defined Under Namespace

Classes: Connection

Constant Summary collapse

DEFAULT_HOST =
"localhost"
DEFAULT_PORT =
19000

Class Method Summary collapse

Methods included from Logging

included, #log

Methods included from FFWD::Plugin

category, discovered, included, load_discovered, load_plugins, loaded

Class Method Details

.setup_input(opts, core) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/ffwd/plugin/json_line.rb', line 33

def self.setup_input opts, core
  opts[:host] ||= DEFAULT_HOST
  opts[:port] ||= DEFAULT_PORT
  buffer_limit = opts["buffer_limit"] || 1000
  protocol = FFWD.parse_protocol(opts[:protocol] || "tcp")
  protocol.bind opts, core, log, Connection, buffer_limit
end

.setup_tunnel(opts, core, tunnel) ⇒ Object



41
42
43
44
45
46
# File 'lib/ffwd/plugin/json_line.rb', line 41

def self.setup_tunnel opts, core, tunnel
  opts[:port] ||= DEFAULT_PORT
  buffer_limit = opts["buffer_limit"] || 1000
  protocol = FFWD.parse_protocol(opts[:protocol] || "tcp")
  protocol.tunnel opts, core, tunnel, log, Connection, buffer_limit
end