-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
transport/grpcframer: create grpcframer package #7397
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7397 +/- ##
========================================
Coverage 81.42% 81.42%
========================================
Files 348 352 +4
Lines 26744 26917 +173
========================================
+ Hits 21775 21916 +141
- Misses 3779 3810 +31
- Partials 1190 1191 +1
|
And |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of style comments. I have some questions about implementation/where things live too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you all for your feedback! I have addressed many of the issues pointed out, and I've left my contribution on some others.
Also, i went ahead and marked some comments as resolved to reduce the noise in the review. |
// Package grpchttp2 defines HTTP/2 types and a framer API and implementation. | ||
package grpchttp2 | ||
|
||
import "golang.org/x/net/http2/hpack" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bummer. We cannot fully get rid of x/net/http2
to keep hpack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true. But Ricardo did mention this in his design, and also x/net/http2/hpack
is a separate package and I would assume this dependency would be much smaller than x/net/http2
.
// mem.BufferSlice. | ||
WriteData(streamID uint32, endStream bool, data ...[]byte) error | ||
// WriteData writes an HTTP/2 HEADERS frame to the stream. | ||
// TODO: Once the mem package gets merged, headerBlock will change type to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to double checl, but TODOs without ldap (TODO(arvindbright)) or without a bug TODO(b/123456) will be tagged by the internal golinter during import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That linter check might not block the import I feel. We have a lot of TODOs which don't have either. And adding bug numbers here will not make sense. So, we can either add username, or leave it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great job getting this through!
@zasweq : You seem to have requested changes on this PR. Do you mind taking a pass? Thanks. |
Create grpcframer package with type definitions.
Fixes: #7376
As part of the effort to reduce buffer copies in the transport layer of gRPC-Go, this PR declares the new API along with the necessary methods to implement a new HTTP/2 Framer.
RELEASE NOTES: none