class Falcon::Configuration::Loader

The domain specific language for loading configuration files.

def host(name, *parents, &block)

Deprecated:
  • Use `service` and `include Falcon::Environment::Server` instead.
def host(name, *parents, &block)
	@configuration.add(
		merge(*parents, name: name, root: @root, authority: name, &block)
	)
end

def load(*features)

Deprecated:
  • Use `require` instead.
def load(*features)
	features.each do |feature|
		case feature
		when Symbol
			require File.join(__dir__, "environment", "#{feature}.rb")
		else
			raise LoadError, "Unsure about how to load #{feature}!"
		end
	end
end

def merge(*parents, **initial, &block)

@yields {...} The block that will generate the environment.
@parameter parents [Array(Symbol)]
@parameter name [String]
Build a new environment with the specified name and the given parents.
def merge(*parents, **initial, &block)
	facets = parents.map{|parent| Environment::LEGACY_ENVIRONMENTS.fetch(parent)}
	
	::Async::Service::Environment.build(*facets, **initial, &block)
end

def proxy(name, *parents, &block)

Deprecated:
  • Use `service` and `include Falcon::Environment::Proxy` instead.
def proxy(name, *parents, &block)
	@configuration.add(
		merge(:proxy, *parents, name: name, root: @root, authority: name, &block)
	)
end

def rack(name, *parents, &block)

Deprecated:
  • Use `service` and `include Falcon::Environment::Rack` instead.
def rack(name, *parents, &block)
	@configuration.add(
		merge(:rack, *parents, name: name, root: @root, authority: name, &block)
	)
end

def supervisor(&block)

Deprecated:
  • Use `service` and `include Falcon::Environment::Supervisor` instead.
def supervisor(&block)
	name = File.join(@root, "supervisor")
	
	@configuration.add(
		merge(:supervisor, name: name, root: @root, &block)
	)
end