Skip to content

Commit 61b6cfe

Browse files
Drop Body postfix. (#1)
1 parent ec6a5fa commit 61b6cfe

File tree

12 files changed

+418
-361
lines changed

12 files changed

+418
-361
lines changed

config/external.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
async-grpc:
2+
url: https://github.com/socketry/async-grpc.git
3+
command: bundle exec sus

context/getting-started.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ $ bundle add protocol-grpc
1515
`protocol-grpc` has several core concepts:
1616

1717
- A {ruby Protocol::GRPC::Interface} class which defines gRPC service contracts with RPC methods, request/response types, and streaming patterns.
18-
- A {ruby Protocol::GRPC::Body::ReadableBody} class which handles reading gRPC messages from HTTP request/response bodies with automatic framing and decoding.
19-
- A {ruby Protocol::GRPC::Body::WritableBody} class which handles writing gRPC messages to HTTP request/response bodies with automatic framing and encoding.
18+
- A {ruby Protocol::GRPC::Body::Readable} class which handles reading gRPC messages from HTTP request/response bodies with automatic framing and decoding.
19+
- A {ruby Protocol::GRPC::Body::Writable} class which handles writing gRPC messages to HTTP request/response bodies with automatic framing and encoding.
2020
- A {ruby Protocol::GRPC::Middleware} abstract base class for building gRPC server applications.
2121
- A {ruby Protocol::GRPC::Call} class which represents the context of a single gRPC RPC call, including deadline tracking.
2222
- A {ruby Protocol::GRPC::Status} module with gRPC status code constants.
@@ -47,15 +47,15 @@ end
4747

4848
### Building a Request
4949

50-
Build gRPC requests using `Protocol::GRPC::Methods` and `Protocol::GRPC::Body::WritableBody`:
50+
Build gRPC requests using `Protocol::GRPC::Methods` and `Protocol::GRPC::Body::Writable`:
5151

5252
``` ruby
5353
require "protocol/grpc"
5454
require "protocol/grpc/methods"
55-
require "protocol/grpc/body/writable_body"
55+
require "protocol/grpc/body/writable"
5656

5757
# Build request body
58-
body = Protocol::GRPC::Body::WritableBody.new(message_class: Hello::HelloRequest)
58+
body = Protocol::GRPC::Body::Writable.new(message_class: Hello::HelloRequest)
5959
body.write(Hello::HelloRequest.new(name: "World"))
6060
body.close_write
6161

@@ -69,13 +69,13 @@ request = Protocol::HTTP::Request["POST", path, headers, body]
6969

7070
### Reading a Response
7171

72-
Read gRPC responses using `Protocol::GRPC::Body::ReadableBody`:
72+
Read gRPC responses using `Protocol::GRPC::Body::Readable`:
7373

7474
``` ruby
75-
require "protocol/grpc/body/readable_body"
75+
require "protocol/grpc/body/readable"
7676

7777
# Read response body
78-
readable_body = Protocol::GRPC::Body::ReadableBody.new(
78+
readable_body = Protocol::GRPC::Body::Readable.new(
7979
response.body,
8080
message_class: Hello::HelloReply
8181
)

0 commit comments

Comments
 (0)