Module: Falcon::Environment::Server
- Included in:
- Application, Proxy, Redirect
- Defined in:
- lib/falcon/environment/server.rb
Overview
Provides an environment for hosting a web application that uses a Falcon server.
Instance Method Summary collapse
-
#authority ⇒ Object
The server authority.
- #cache ⇒ Object
- #client_endpoint ⇒ Object
-
#container_options ⇒ Object
Options to use when creating the container.
-
#endpoint ⇒ Object
The upstream endpoint that will handle incoming requests.
-
#preload ⇒ Object
Any scripts to preload before starting the server.
-
#service_class ⇒ Object
The service class to use for the proxy.
- #timeout ⇒ Object
-
#url ⇒ Object
The host that this server will receive connections for.
- #verbose ⇒ Object
Instance Method Details
#authority ⇒ Object
The server authority. Defaults to the server name.
24 25 26 |
# File 'lib/falcon/environment/server.rb', line 24 def self.name end |
#cache ⇒ Object
55 56 57 |
# File 'lib/falcon/environment/server.rb', line 55 def cache false end |
#client_endpoint ⇒ Object
59 60 61 |
# File 'lib/falcon/environment/server.rb', line 59 def client_endpoint ::Async::HTTP::Endpoint.parse(url) end |
#container_options ⇒ Object
Options to use when creating the container.
29 30 31 |
# File 'lib/falcon/environment/server.rb', line 29 def {restart: true} end |
#endpoint ⇒ Object
The upstream endpoint that will handle incoming requests.
44 45 46 47 48 49 |
# File 'lib/falcon/environment/server.rb', line 44 def endpoint ::Async::HTTP::Endpoint.parse(url).with( reuse_address: true, timeout: timeout, ) end |
#preload ⇒ Object
Any scripts to preload before starting the server.
64 65 66 |
# File 'lib/falcon/environment/server.rb', line 64 def preload [] end |
#service_class ⇒ Object
The service class to use for the proxy.
18 19 20 |
# File 'lib/falcon/environment/server.rb', line 18 def service_class Service::Server end |
#timeout ⇒ Object
38 39 40 |
# File 'lib/falcon/environment/server.rb', line 38 def timeout nil end |
#url ⇒ Object
The host that this server will receive connections for.
34 35 36 |
# File 'lib/falcon/environment/server.rb', line 34 def url "http://[::]:9292" end |
#verbose ⇒ Object
51 52 53 |
# File 'lib/falcon/environment/server.rb', line 51 def verbose false end |