fullstorydev / grpchan

Channels for gRPC: custom transports
MIT License
204 stars 23 forks source link

Expose original clientCtx (mostly for inproc interceptors) #38

Closed dragonsinth closed 5 years ago

jhump commented 5 years ago

mostly for inproc interceptors

I need more info. Why do we want inproc interceptors? The interceptors should be applicable to both in-process and out-of-process calls.

dragonsinth commented 5 years ago

While that is true, in practice I've noticed in practice that in-process channels often need particular values from the client context, such as a logger or authentication. Those in-process interceptors are currently setup to grab those necessary values from an unrelated, third context-- which only has the correct values through careful orchestration of client code. It's much better to be able to examine the original client context, which has the correct values already.

dragonsinth commented 5 years ago

Yeah, I think test code using in proc grpc to mocks is probably another good example of where this is useful.