Is your feature request related to a problem? Please describe.
I want to implement a fan-out in my service where a request would be sent to multiple nodes and then all of the responses would be streamed back to the client. I want to be able to return partial data if some Receive() has lagged for too much i.e. to not block for the whole duration/context of the stream
Describe the solution you'd like
https://github.com/bufbuild/connect-go/blob/159c8011dfbb90d26b040f8800316e24a6cdb6e3/protocol_grpc.go#L341
https://github.com/bufbuild/connect-go/blob/159c8011dfbb90d26b040f8800316e24a6cdb6e3/protocol_grpc.go#L466
I think these methods should accept context.Context as the first parameter.
Describe alternatives you've considered
The alternative is to spawn another goroutine (for example) just for implementing a timeout. It's wasteful of resources, it forbids receiving messages as fast as possible because you need to have a channel in the middle, and it introduces unnecessary complexity
Additional context
N/A
Is your feature request related to a problem? Please describe.
I want to implement a fan-out in my service where a request would be sent to multiple nodes and then all of the responses would be streamed back to the client. I want to be able to return partial data if some Receive() has lagged for too much i.e. to not block for the whole duration/context of the stream
Describe the solution you'd like
https://github.com/bufbuild/connect-go/blob/159c8011dfbb90d26b040f8800316e24a6cdb6e3/protocol_grpc.go#L341
https://github.com/bufbuild/connect-go/blob/159c8011dfbb90d26b040f8800316e24a6cdb6e3/protocol_grpc.go#L466
I think these methods should accept
context.Contextas the first parameter.Describe alternatives you've considered
The alternative is to spawn another goroutine (for example) just for implementing a timeout. It's wasteful of resources, it forbids receiving messages as fast as possible because you need to have a channel in the middle, and it introduces unnecessary complexity
Additional context
N/A