This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
forked from connectrpc/connect-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change generated type names, drop Simple/Full
As discussed in connectrpc#53, we're dropping the Simple/Full nomenclature. For clients, we keep the `NewPingServiceClient` function, which returns the `PingServiceClient` struct. The two client interfaces change to `WrappedPingServiceClient` (simple) and `UnwrappedPingServiceClient` (full-featured). For handlers, we drop the simplified interface completely - it was purely for documentation, and wasn't ever referenced. Instead, we name the server-side interface `PingService`, and we export the adaptive constructor as `NewPingService`. We un-export the strongly-typed constructor. The server changes seem like they'd greatly reduce safety, but that's not the case. Today, grpc-go servers almost always embed `UnimplementedPingServiceServer`. Even if the actual method implementations have a typo, the compiler will still be happy. With our system, users get more flexibility and the same guarantees in practice.
- Loading branch information
1 parent
2a5677f
commit 735d799
Showing
13 changed files
with
304 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.