class Falcon::Command::Proxy
Implements the `falcon proxy` command.
Manages a {Controller::Proxy} instance which is responsible for proxing incoming requests.
Public Instance Methods
call()
click to toggle source
Prepare the environment and run the controller.
# File lib/falcon/command/proxy.rb, line 68 def call Console.logger.info(self) do |buffer| buffer.puts "Falcon Proxy v#{VERSION} taking flight!" buffer.puts "- Binding to: #{@options[:bind]}" buffer.puts "- To terminate: Ctrl-C or kill #{Process.pid}" buffer.puts "- To reload: kill -HUP #{Process.pid}" end self.controller.run end
container_class()
click to toggle source
The container class to use.
# File lib/falcon/command/proxy.rb, line 57 def container_class Async::Container.best_container_class end
container_options()
click to toggle source
Options for the container. See {Controller::Serve#setup}.
# File lib/falcon/command/proxy.rb, line 63 def container_options {} end
controller()
click to toggle source
Prepare a new controller for the command.
# File lib/falcon/command/proxy.rb, line 52 def controller Controller::Proxy.new(self) end
endpoint(**options)
click to toggle source
The endpoint to bind to.
# File lib/falcon/command/proxy.rb, line 80 def endpoint(**options) Async::HTTP::Endpoint.parse(@options[:bind], timeout: @options[:timeout], **options) end