Class: VCAP::Services::BaseAsynchronousServiceGateway
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- VCAP::Services::BaseAsynchronousServiceGateway
- Includes:
- VCAP::Services::Base::Error
- Defined in:
- lib/base/base_async_gateway.rb
Overview
A simple service gateway that proxies requests onto an asynchronous service provisioners. NB: Do not use this with synchronous provisioners, it will produce unexpected results.
TODO(mjp): This needs to handle unknown routes
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(opts) ⇒ BaseAsynchronousServiceGateway
constructor
A new instance of BaseAsynchronousServiceGateway.
-
#setup(opts) ⇒ Object
setup the environment.
-
#validate_incoming_request ⇒ Object
Custom request validation.
Methods included from VCAP::Services::Base::Error
#failure, #internal_fail, #parse_msg, #success, #timeout_fail
Constructor Details
#initialize(opts) ⇒ BaseAsynchronousServiceGateway
Returns a new instance of BaseAsynchronousServiceGateway.
35 36 37 38 39 40 41 |
# File 'lib/base/base_async_gateway.rb', line 35 def initialize(opts) super @logger = opts[:logger] setup(opts) end |