raptor 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/Dockerfile +7 -1
- data/README.md +183 -68
- data/docs/assets/profile_picture.png +0 -0
- data/docs/assets/startup_output.svg +37 -0
- data/docs/raptor-vs-puma.md +103 -429
- data/docs/talk.md +262 -169
- data/ext/raptor_http/raptor_http.c +82 -123
- data/lib/rackup/handler/raptor.rb +2 -1
- data/lib/raptor/cli.rb +1 -0
- data/lib/raptor/cluster.rb +85 -39
- data/lib/raptor/control_server.rb +2 -0
- data/lib/raptor/http.rb +0 -1
- data/lib/raptor/http1.rb +52 -30
- data/lib/raptor/http2.rb +46 -13
- data/lib/raptor/plugin.rb +98 -0
- data/lib/raptor/version.rb +1 -1
- data/sig/generated/raptor/cluster.rbs +18 -5
- data/sig/generated/raptor/http.rbs +0 -2
- data/sig/generated/raptor/http1.rbs +21 -13
- data/sig/generated/raptor/http2.rbs +12 -9
- data/sig/generated/raptor/plugin.rbs +52 -0
- metadata +5 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Generated from lib/raptor/plugin.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
module Raptor
|
|
4
|
+
# An extension, loaded from `raptor/plugin/<name>` or
|
|
5
|
+
# registered explicitly by application code.
|
|
6
|
+
class Plugin
|
|
7
|
+
class UnknownPlugin < LoadError
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
self.@registry: Hash[String, singleton(Plugin)]
|
|
11
|
+
|
|
12
|
+
# Registers a plugin class under a name.
|
|
13
|
+
#
|
|
14
|
+
# @rbs (String | Symbol name, singleton(Plugin) plugin) -> void
|
|
15
|
+
def self.register: (String | Symbol name, singleton(Plugin) plugin) -> void
|
|
16
|
+
|
|
17
|
+
# Defines and registers a plugin without a named subclass.
|
|
18
|
+
#
|
|
19
|
+
# @rbs (String | Symbol name) { () -> void } -> singleton(Plugin)
|
|
20
|
+
def self.create: (String | Symbol name) { () -> void } -> singleton(Plugin)
|
|
21
|
+
|
|
22
|
+
# Loads a registered plugin, requiring its conventional path if needed.
|
|
23
|
+
#
|
|
24
|
+
# @rbs (String | Symbol name) -> Plugin
|
|
25
|
+
def self.load: (String | Symbol name) -> Plugin
|
|
26
|
+
|
|
27
|
+
@threads: Array[Thread]?
|
|
28
|
+
|
|
29
|
+
# Starts in the master before workers fork. Override to open resources
|
|
30
|
+
# and append callbacks to the cluster's lifecycle hook arrays.
|
|
31
|
+
#
|
|
32
|
+
# @rbs (Cluster cluster) -> void
|
|
33
|
+
def start: (Cluster cluster) -> void
|
|
34
|
+
|
|
35
|
+
# Stops in the master after workers exit, including before hot restart.
|
|
36
|
+
# Also called if startup fails, so resources may be only partly opened.
|
|
37
|
+
#
|
|
38
|
+
# @rbs () -> void
|
|
39
|
+
def stop: () -> void
|
|
40
|
+
|
|
41
|
+
# Runs a block on a master-owned thread. Raptor stops and joins these
|
|
42
|
+
# threads after calling `stop`; use `ensure` in the block for cleanup.
|
|
43
|
+
#
|
|
44
|
+
# @rbs () { () -> void } -> Thread
|
|
45
|
+
def in_background: () { () -> void } -> Thread
|
|
46
|
+
|
|
47
|
+
# Calls the plugin's stop callback and joins its background threads.
|
|
48
|
+
#
|
|
49
|
+
# @rbs () -> void
|
|
50
|
+
def shutdown: () -> void
|
|
51
|
+
end
|
|
52
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: raptor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.24.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joshua Young
|
|
@@ -141,6 +141,8 @@ files:
|
|
|
141
141
|
- LICENSE.txt
|
|
142
142
|
- README.md
|
|
143
143
|
- Rakefile
|
|
144
|
+
- docs/assets/profile_picture.png
|
|
145
|
+
- docs/assets/startup_output.svg
|
|
144
146
|
- docs/raptor-vs-puma.md
|
|
145
147
|
- docs/talk.md
|
|
146
148
|
- exe/raptor
|
|
@@ -163,6 +165,7 @@ files:
|
|
|
163
165
|
- lib/raptor/http1.rb
|
|
164
166
|
- lib/raptor/http2.rb
|
|
165
167
|
- lib/raptor/log.rb
|
|
168
|
+
- lib/raptor/plugin.rb
|
|
166
169
|
- lib/raptor/reactor.rb
|
|
167
170
|
- lib/raptor/reuseport_bpf.rb
|
|
168
171
|
- lib/raptor/server.rb
|
|
@@ -181,6 +184,7 @@ files:
|
|
|
181
184
|
- sig/generated/raptor/http1.rbs
|
|
182
185
|
- sig/generated/raptor/http2.rbs
|
|
183
186
|
- sig/generated/raptor/log.rbs
|
|
187
|
+
- sig/generated/raptor/plugin.rbs
|
|
184
188
|
- sig/generated/raptor/reactor.rbs
|
|
185
189
|
- sig/generated/raptor/reuseport_bpf.rbs
|
|
186
190
|
- sig/generated/raptor/server.rbs
|