Class: Falcon::Command::Redirect
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Falcon::Command::Redirect
show all
- Includes:
- Paths
- Defined in:
- lib/falcon/command/redirect.rb
Instance Method Summary
collapse
Methods included from Paths
#configuration, #resolved_paths
Instance Method Details
#call ⇒ Object
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/falcon/command/redirect.rb', line 54
def call
Async.logger.info(self) do |buffer|
buffer.puts "Falcon Redirect 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
46
47
48
|
# File 'lib/falcon/command/redirect.rb', line 46
def container_class
Async::Container.best_container_class
end
|
#container_options ⇒ Object
50
51
52
|
# File 'lib/falcon/command/redirect.rb', line 50
def container_options
{}
end
|
#controller ⇒ Object
42
43
44
|
# File 'lib/falcon/command/redirect.rb', line 42
def controller
Controller::Redirect.new(self)
end
|
#endpoint(**options) ⇒ Object
65
66
67
|
# File 'lib/falcon/command/redirect.rb', line 65
def endpoint(**options)
Async::HTTP::Endpoint.parse(@options[:bind], **options)
end
|
#redirect_endpoint(**options) ⇒ Object
69
70
71
|
# File 'lib/falcon/command/redirect.rb', line 69
def redirect_endpoint(**options)
Async::HTTP::Endpoint.parse(@options[:redirect], **options)
end
|