You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/falcon/environment/server.rb
+3-23Lines changed: 3 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
# Released under the MIT License.
4
4
# Copyright, 2020-2025, by Samuel Williams.
5
5
6
-
require"async/service/generic"
6
+
require"async/service/managed/environment"
7
7
require"async/http/endpoint"
8
8
9
9
require_relative"../service/server"
@@ -13,6 +13,8 @@ module Falcon
13
13
moduleEnvironment
14
14
# Provides an environment for hosting a web application that uses a Falcon server.
15
15
moduleServer
16
+
includeAsync::Service::Managed::Environment
17
+
16
18
# The service class to use for the proxy.
17
19
# @returns [Class]
18
20
defservice_class
@@ -25,21 +27,6 @@ def authority
25
27
self.name
26
28
end
27
29
28
-
# Number of instances to start. By default (when nil), uses `Etc.nprocessors`.
29
-
# @returns [Integer | nil]
30
-
defcount
31
-
nil
32
-
end
33
-
34
-
# Options to use when creating the container.
35
-
defcontainer_options
36
-
{
37
-
restart: true,
38
-
count: self.count,
39
-
health_check_timeout: 30,
40
-
}.compact
41
-
end
42
-
43
30
# The host that this server will receive connections for.
44
31
defurl
45
32
"http://[::]:9292"
@@ -80,13 +67,6 @@ def client_endpoint
80
67
::Async::HTTP::Endpoint.parse(url)
81
68
end
82
69
83
-
# Any scripts to preload before starting the server.
84
-
#
85
-
# @returns [Array(String)] The list of scripts to preload.
86
-
defpreload
87
-
[]
88
-
end
89
-
90
70
# Make a server instance using the given endpoint. The endpoint may be a bound endpoint, so we take care to specify the protocol and scheme as per the original endpoint.
91
71
#
92
72
# @parameter endpoint [IO::Endpoint] The endpoint to bind to.
0 commit comments