-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Streaming Interceptors #3641
base: v3
Are you sure you want to change the base?
Streaming Interceptors #3641
Conversation
…wrapping streaming methods
…plied; import the correct user types packages when rendering service_interceptors.go; fix an ancient typo
…dpoint field from goa.InterceptorInfo struct since it is redundant with the next goa.Endpoint parameter sent to interceptors
…thod with interceptors even if they do not apply
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.
Really great PR! I left very few minor comments. Overall it all makes sense and follows the existing patterns very well, good job!
{{- range .WrappedClientStreams }} | ||
|
||
{{ comment (printf "wrapped%s is a client interceptor wrapper for the %s stream." .Interface .Interface) }} | ||
type wrapped{{ .Interface }} struct { |
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.
Might be nice to move the type definition to the top of the file
@@ -9,8 +9,10 @@ type ( | |||
Service string |
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.
We should update the struct header comment to reflect the changes
@@ -9,8 +9,10 @@ type ( | |||
Service string | |||
// Name of method handling request | |||
Method string | |||
// Endpoint of request, can be used for retrying | |||
Endpoint Endpoint | |||
// Send is true if the request is a streaming Send |
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.
What's the rationale for these two fields? I could see Send
helping differentiate between the initial request and the streaming request in the case of websocket but not sure I understand the point of Recv
?
SendWithContext
andRecvWithContext
methods to the stream interfaces