-
Notifications
You must be signed in to change notification settings - Fork 4.6k
mem: Remove Reader interface and export the concrete struct #8669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8669 +/- ##
==========================================
+ Coverage 81.97% 83.01% +1.04%
==========================================
Files 417 417
Lines 40788 32308 -8480
==========================================
- Hits 33435 26822 -6613
+ Misses 5991 4097 -1894
- Partials 1362 1389 +27
🚀 New features to boost your workflow:
|
|
welp we were using this interface :( |
If you can say more about why and how, maybe we can have a discussion. In the meantime I can refer you to https://pkg.go.dev/google.golang.org/grpc/mem which says prominently at the top:
And https://github.com/grpc/grpc-go/blob/master/Documentation/versioning.md:
|
|
@dfawley We are wrapping thrift into gRPC as a migration path. Don't worry though, we know this is experimental, the fix is trivial on our end to adapt to this. |
Glad to hear. We aren't trying to break anyone, so if something changes from possible->impossible, or is causing undue burden, even for experimental APIs, we would like to hear about it. |
This PR changes the exported slice reader from an interface to a concrete struct.
This approach follows the precedent set by standard library packages, such as
bufio'sbufio.Reader. This interface was not intended for users to implement, and gRPC does not plan to provide alternative implementations. Users who require an interface for abstraction or testing can define one in their own packages.This change provides two main advantages:
Benchmarks
RELEASE NOTES:
Readerinterface with a struct.