Class: Upfluence::HTTP::Builder

Inherits:
Rack::Builder
  • Object
show all
Defined in:
lib/upfluence/http/builder.rb

Instance Method Summary collapse

Instance Method Details

#run_thrift(processor, handler, timeout = 30) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/upfluence/http/builder.rb', line 8

def run_thrift(processor, handler, timeout = 30)
  run Thrift::RackApplication.for(
    '/',
    processor.new(
      Upfluence::Utils::Thrift::Middleware.setup(handler, timeout)
    ),
    Thrift::BinaryProtocolFactory.new
  )
end