ruvoy 0.2.0-aarch64-linux → 0.3.0-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 570d5fa414a87e4f204964ad1dac4b45527948bb3fed5473559cc8698cb80689
4
- data.tar.gz: 2d49878f9c9add538a8560d93988cc9c1fcbc838839f79f12e4a2f064823c739
3
+ metadata.gz: fefd369b927abc5671a8ac2452a1bdf9f0c1adf7d82b0ed75f3f5722666f222f
4
+ data.tar.gz: 64cdea87b4578985ac17eb8bf0e80910dfc28c4bb99c7d7c02af12d7a4cc3dca
5
5
  SHA512:
6
- metadata.gz: 61fd6ebec19502a5160627811938fdcca59c4fdeceed34eaea0f9cc1869d85aa9a6280ea98ae1a984bd6b2733a083c643976fd10c210c93c4aee304ba5d8bd6c
7
- data.tar.gz: 0ca15aefdd13ae67dd6c90ab67e4fd98f6d6fd3a0c72bc0da7f2983b32cd16a4c2a585daf5d0bddd7b8465695e0cdb5fcc67627da729aefc13e58a76719f5837
6
+ metadata.gz: 537f6f438fbf00989ac849ae513a8de4191f3d2db0de429a145beaa4c55d9a72a10cfcc1698c47d16ca3ed158bd1f2fd3e3df5d1a64d108a6dc3f5a15c1693f5
7
+ data.tar.gz: f8c03b8ead4ce392a7376b8f740f692486a19d3122c9d039097db47b948c28fd7b4d789934d9fe173ebe844e8e466e196ee5e80591ca88949074b276b5aef1da
data/README.md CHANGED
@@ -141,10 +141,13 @@ kept, in memory up to 128 KiB and in a temporary file beyond that, so
141
141
  Rack versions expect. Raw socket hijacking
142
142
  (`rack.hijack`) is not supported; the connection always belongs to Envoy.
143
143
 
144
- A response body that fails after its headers are already on the wire can only
145
- stop: a dynamic module cannot reset a stream it has started answering, so the
146
- client receives a short body rather than an error. Applications that can fail
147
- partway through should send their own length or checksum.
144
+ WebSocket and other upgrades use Rack 3's `rack.protocol` with a streaming
145
+ body instead, over HTTP/1.1 and HTTP/2, once Envoy allows them
146
+ (`upgrade_configs`, plus `allow_connect` for HTTP/2).
147
+
148
+ A response body that fails after its headers are already on the wire resets
149
+ the stream, so the client sees an error rather than a short body that looks
150
+ complete.
148
151
 
149
152
  ## Blocking calls
150
153
 
@@ -274,8 +277,21 @@ one request overlap. A repeated response header arrives as an Array.
274
277
  - A response body over `max_response_bytes`, or over Envoy's own buffer limit,
275
278
  raises `Ruvoy::UpstreamResponseTooLarge`, a subclass of `Ruvoy::UpstreamError`,
276
279
  so a caller can tell asking for less apart from trying again later.
277
- - Responses are buffered whole, so `max_response_bytes` bounds what one call
278
- can hold in memory.
280
+ - `call` buffers the response whole, so `max_response_bytes` bounds what one
281
+ call can hold in memory.
282
+
283
+ `stream` takes the same arguments but returns once the head is in, with a
284
+ body that streams and can be returned as the Rack response, so a proxy is one
285
+ line:
286
+
287
+ ```ruby
288
+ run ->(env) { env["ruvoy.upstream"].stream("api", env["REQUEST_METHOD"], env["PATH_INFO"], body: env["rack.input"]) }
289
+ ```
290
+
291
+ Envoy applies no flow control to it, so a reader that falls more than
292
+ `upstream.stream_buffer_bytes` (1 MiB by default) behind has the stream reset.
293
+ With `protocol: "websocket"`, the response upgrades the client too and relays
294
+ both ways.
279
295
 
280
296
  [`examples/extensions`](examples/extensions) runs both against a stand-in
281
297
  service, including two calls from one request overlapping.
Binary file
data/lib/ruvoy/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  module Ruvoy
4
4
  # Kept in step with the Cargo workspace version by test/e2e/cli_test.rb: the
5
5
  # gem and the module it carries are the same release.
6
- VERSION = "0.2.0"
6
+ VERSION = "0.3.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruvoy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Zixin Zhou