You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's normal if you're writing an HTTP server to take the context.Context from the http.Request and use that when you make various calls to formulate the response. In that way if the client closes the connection, your RPC call that is 3 microservices deep doing resource-intensive work can cancel because nobody is listening to the answer anymore.
Although I appreciate that someone has taken the time to add context.Context support to this package, it doesn't seem like I can hook it up to the context from an HTTP request. For example, I'd like to do this:
Anyway, that's pseudo-code, but you get the point. I need to be able to do rpcServer.ServeCodec(ctx, codec) essentially. I can figure out hacking that in, but I'm wondering if any of the maintainers have thoughts on this.
The text was updated successfully, but these errors were encountered:
It's normal if you're writing an HTTP server to take the
context.Context
from thehttp.Request
and use that when you make various calls to formulate the response. In that way if the client closes the connection, your RPC call that is 3 microservices deep doing resource-intensive work can cancel because nobody is listening to the answer anymore.Although I appreciate that someone has taken the time to add
context.Context
support to this package, it doesn't seem like I can hook it up to the context from an HTTP request. For example, I'd like to do this:Anyway, that's pseudo-code, but you get the point. I need to be able to do
rpcServer.ServeCodec(ctx, codec)
essentially. I can figure out hacking that in, but I'm wondering if any of the maintainers have thoughts on this.The text was updated successfully, but these errors were encountered: