-
Notifications
You must be signed in to change notification settings - Fork 29
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
Improve StreamingHandlers contract #675
Comments
Great idea, it's a bit hard to use currently. I'm adding some comments below.
smth like
The client uses
What happens if the handler finishes and the output channel isn't closed? (discard if you're thinking of Some other remarks:
|
I'm updating the description |
To understand @tharvik's comments, here the original description: The current
A first, simplified change could be:
Onet would do the following:
|
The current
RegisterStreamingHandlers
is not ideal when it comes to implement a streaming service:A first, simplified method signature for a blocking endpoint:
Endpoint(<-input, ->output) error
nil
to indicate the endpoint finished its work and is doneOnet would do the following:
Client.Stream
nil
error to indicate successful terminationnil
error indicates an error by the endpointnil
, the connection is closed without an errornil
, the error is sent as the reason for closing the connectionComments, @tharvik @cgrigis @nkcr ?
The text was updated successfully, but these errors were encountered: