[Question] design tradeoffs about including ctx in method argument for generated stream handler #768
Answered
by
emcfarlane
DMwangnima
asked this question in
Q&A
|
Hi all, I noticed that for connect-go, it generated stream handler with ctx in method argument: For grpc-go, instead of adding a ctx in method argument, it adds a
|
Answered by
emcfarlane
Jul 31, 2024
Replies: 2 comments 1 reply
|
Hi @DMwangnima moved this issue to a discussion. The |
1 reply
Answer selected by
DMwangnima
|
meta: is it possible to block non-maintainers from opening discussions? sucks to have this stuff crowd out other things in the homepage |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @DMwangnima moved this issue to a discussion. The
context.Contextis passed as the first arg for usability and consistency. It allows interceptors to set the context more easily then stubbing the method on the stream handler.