protocol-grpc 0.16.0 → 0.17.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
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/grpc/body/readable.rb +3 -8
- data/lib/protocol/grpc/call.rb +1 -1
- data/lib/protocol/grpc/error.rb +1 -0
- data/lib/protocol/grpc/status.rb +2 -1
- data/lib/protocol/grpc/version.rb +1 -1
- data/lib/protocol/grpc.rb +1 -1
- data/license.md +1 -0
- data/readme.md +8 -10
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +2 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf0f2ec7ae263ceb0b3191c0f3da1b9a6222dd3e0b5e584cc2ec19fa7ebb8857
|
|
4
|
+
data.tar.gz: 303bf31a141edf34f610e1f2a4432571af30c15b65cfc784d1de00915cecb765
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8d6063d80afcb48d81acc7ac8b3a568c73b8726bb5e369101a5aae49cd31ab66af5cb483304c578db95cf6d03757b8e92460f389a03216ab5870e2b332e519c
|
|
7
|
+
data.tar.gz: 4b7031d73d14092692c1fa05f0a6960446e50b37dd4088fa0132e89cf4be143f32c74f2ff1554ecf9248de67ed4688520bc98898566cb83dac7f9daef64c74d6
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -48,6 +48,7 @@ module Protocol
|
|
|
48
48
|
|
|
49
49
|
# Read the next gRPC message.
|
|
50
50
|
# Overrides Wrapper#read to transform raw HTTP body chunks into decoded gRPC messages.
|
|
51
|
+
# Errors raised by the underlying body propagate unchanged.
|
|
51
52
|
# @returns [Object | String | Nil] Decoded message, raw binary, or `Nil` if stream ended
|
|
52
53
|
def read
|
|
53
54
|
# Read 5-byte prefix: 1 byte compression flag + 4 bytes length
|
|
@@ -85,14 +86,8 @@ module Protocol
|
|
|
85
86
|
def read_exactly(n)
|
|
86
87
|
# Fill buffer until we have enough data:
|
|
87
88
|
while @buffer.bytesize < n
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
raise Error.new(Status::INTERNAL, "Truncated gRPC frame: expected #{n} bytes, received #{@buffer.bytesize}")
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# Read chunk from underlying body:
|
|
95
|
-
chunk = @body.read
|
|
89
|
+
# An empty body can still have a pending error, so read to determine EOF:
|
|
90
|
+
chunk = @body&.read
|
|
96
91
|
|
|
97
92
|
if chunk.nil?
|
|
98
93
|
return nil if @buffer.empty?
|
data/lib/protocol/grpc/call.rb
CHANGED
data/lib/protocol/grpc/error.rb
CHANGED
data/lib/protocol/grpc/status.rb
CHANGED
data/lib/protocol/grpc.rb
CHANGED
data/license.md
CHANGED
data/readme.md
CHANGED
|
@@ -28,6 +28,10 @@ Please see the [project documentation](https://socketry.github.io/protocol-grpc/
|
|
|
28
28
|
|
|
29
29
|
Please see the [project releases](https://socketry.github.io/protocol-grpc/releases/index) for all releases.
|
|
30
30
|
|
|
31
|
+
### v0.17.0
|
|
32
|
+
|
|
33
|
+
- Preserve underlying body read errors, including failures before a message, during a partial frame, or while finishing the stream. These failures are no longer hidden as EOF or replaced with a truncated-frame error.
|
|
34
|
+
|
|
31
35
|
### v0.16.0
|
|
32
36
|
|
|
33
37
|
- Preserve timeout precision within the eight-digit wire limit, rounding up when necessary.
|
|
@@ -72,12 +76,6 @@ Please see the [project releases](https://socketry.github.io/protocol-grpc/relea
|
|
|
72
76
|
|
|
73
77
|
- Add `RPC#name`.
|
|
74
78
|
|
|
75
|
-
### v0.3.0
|
|
76
|
-
|
|
77
|
-
- **Breaking**: `Protocol::GRPC::Call` now takes a `response` object parameter instead of separate `response_headers`.
|
|
78
|
-
- **Breaking**: Removed `Call#response_headers` method. Use `call.response.headers` directly.
|
|
79
|
-
- Added `RPC#streaming?` method to check if an RPC is streaming.
|
|
80
|
-
|
|
81
79
|
## See Also
|
|
82
80
|
|
|
83
81
|
- [async-grpc](https://github.com/socketry/async-grpc) — Asynchronous gRPC client and server implementation using this interface.
|
|
@@ -98,16 +96,16 @@ We welcome contributions to this project.
|
|
|
98
96
|
|
|
99
97
|
To run the test suite:
|
|
100
98
|
|
|
101
|
-
```
|
|
102
|
-
bundle exec sus
|
|
99
|
+
``` bash
|
|
100
|
+
$ bundle exec sus
|
|
103
101
|
```
|
|
104
102
|
|
|
105
103
|
### Making Releases
|
|
106
104
|
|
|
107
105
|
To make a new release:
|
|
108
106
|
|
|
109
|
-
```
|
|
110
|
-
bundle exec bake gem:release:patch # or minor or major
|
|
107
|
+
``` bash
|
|
108
|
+
$ bundle exec bake gem:release:patch # or minor or major
|
|
111
109
|
```
|
|
112
110
|
|
|
113
111
|
### Developer Certificate of Origin
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.17.0
|
|
4
|
+
|
|
5
|
+
- Preserve underlying body read errors, including failures before a message, during a partial frame, or while finishing the stream. These failures are no longer hidden as EOF or replaced with a truncated-frame error.
|
|
6
|
+
|
|
3
7
|
## v0.16.0
|
|
4
8
|
|
|
5
9
|
- Preserve timeout precision within the eight-digit wire limit, rounding up when necessary.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|