Skip to content
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

Pull request proxy frame #19

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joeldejesus1
Copy link

I changed proxy.frame to proxy.Frame and added a Size() int method to allow the proxy to measure data throughput in an interceptor.

@@ -32,17 +32,21 @@ type rawCodec struct {
parentCodec grpc.Codec //nolint: staticcheck
}

type frame struct {
type Frame struct {
Copy link
Member

@smira smira May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to expose this type as public, we can keep it frame, and add an interface

type SizeableFrame interface {
    FrameSize() int
}

This way any interceptor can typecast the payload and see if it implements the interface.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. I can change my request to do that instead.

@smira
Copy link
Member

smira commented May 8, 2024

I'll push some changes to main, please squash your commits, make signed-off (no need to sign with GPG) and make sure make passes for your

@smira smira self-assigned this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants