class Falcon::Services

The list of services is typically generated from the user supplied ‘falcon.rb` configuration file, which is loaded into an immutable {Configuration} instance, which is mapped into a list of services.
- Proxy services wrapped by {Service::Proxy}.
- Host supervisor implemented in {Service::Supervisor}.
- Rack applications wrapped by {Service::Application}.
The services model allows falcon to manage one more more service associated with a given host. Some examples of services include:
Represents one or more services associated with a host.

def add(service)

@parameter service [Service]

Add a named service.
def add(service)
	@named[service.name] = service
end

def each(&block)

Enumerate all named services.
def each(&block)
	@named.each_value(&block)
end

def initialize(configuration)

@parameter configuration [Configuration]

Initialize the services from the given configuration.
def initialize(configuration)
	@named = {}
	
	configuration.each(:service) do |environment|
		service = Service::Generic.wrap(environment)
		
		add(service)
	end
end

def setup(container)

@parameter container [Async::Container::Generic]

Setup all named services into the given container.
def setup(container)
	@named.each do |name, service|
		Async.logger.debug(self) {"Setup #{name} into #{container}..."}
		service.setup(container)
	end
	
	return container
end

def start

Start all named services.
def start
	@named.each do |name, service|
		Async.logger.debug(self) {"Starting #{name}..."}
		service.start
	end
end

def stop

Stop all named services.
def stop
	failed = false
	
	@named.each do |name, service|
		Async.logger.debug(self) {"Stopping #{name}..."}
		
		begin
			service.stop
		rescue
			failed = true
			Async.logger.error(self, $!)
		end
	end
	
	return failed
end