Class: Berkshelf::API::ApplicationSupervisor

Inherits:
Celluloid::SupervisionGroup
  • Object
show all
Defined in:
lib/berkshelf/api/application.rb

Instance Method Summary collapse

Constructor Details

#initialize(registry, options = {}) ⇒ ApplicationSupervisor

Returns a new instance of ApplicationSupervisor.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :disable_http (Boolean) — default: false

    run the application without the rest gateway



13
14
15
16
17
18
19
20
21
22
# File 'lib/berkshelf/api/application.rb', line 13

def initialize(registry, options = {})
  super(registry)
  supervise_as(:cache_manager, Berkshelf::API::CacheManager)
  supervise_as(:cache_builder, Berkshelf::API::CacheBuilder)

  unless options[:disable_http]
    require_relative 'rest_gateway'
    supervise_as(:rest_gateway, Berkshelf::API::RESTGateway, options)
  end
end