Class: Bosh::Director::App

Inherits:
Object show all
Defined in:
lib/bosh/director/app.rb

Overview

This is a work in progress.

The App is the “top of the world”; it holds all the stateful components in the system. There should be only one instance, available as a class instance to the (hopefully few) components that require it.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ App

Returns a new instance of App.



21
22
23
24
25
26
27
28
29
# File 'lib/bosh/director/app.rb', line 21

def initialize(config)
  # You should only create one of these at a time, but when you create one
  # it becomes the authoritative official version across the whole app.
  @@instance = self

  config.configure_evil_config_singleton!

  @blobstores = Blobstores.new(config)
end

Instance Attribute Details

#blobstoresObject (readonly)

Returns the value of attribute blobstores.



19
20
21
# File 'lib/bosh/director/app.rb', line 19

def blobstores
  @blobstores
end

Class Method Details

.instanceObject

Some places need to reference the authoritative app instance from class methods.



14
15
16
# File 'lib/bosh/director/app.rb', line 14

def instance
  @@instance
end