Class: Falcon::Command::Proxy
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Falcon::Command::Proxy
show all
- Includes:
- Paths
- Defined in:
- lib/falcon/command/proxy.rb
Instance Method Summary
collapse
Methods included from Paths
#configuration, #resolved_paths
Instance Method Details
#call ⇒ Object
55
56
57
58
59
60
61
62
63
64
|
# File 'lib/falcon/command/proxy.rb', line 55
def call
Async.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 ⇒ Object
47
48
49
|
# File 'lib/falcon/command/proxy.rb', line 47
def container_class
Async::Container.best_container_class
end
|
#container_options ⇒ Object
51
52
53
|
# File 'lib/falcon/command/proxy.rb', line 51
def container_options
{}
end
|
#controller ⇒ Object
43
44
45
|
# File 'lib/falcon/command/proxy.rb', line 43
def controller
Controller::Proxy.new(self)
end
|
#endpoint(**options) ⇒ Object
66
67
68
|
# File 'lib/falcon/command/proxy.rb', line 66
def endpoint(**options)
Async::HTTP::Endpoint.parse(@options[:bind], timeout: @options[:timeout], **options)
end
|