class Falcon::Configuration::Loader
The domain specific language for loading configuration files.
def host(name, *parents, &block)
- 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)
- 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)
@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)
- 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)
- 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)
- 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