-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Argument to NewFooClient() in generated proto code is a grpc.ClientConn struct #589
Comments
I'm not sure that would help, without making a truly massive interface for What is the bigger task you are trying to achieve? There's probably a better approach. Can you describe your goal in a bit more detail? |
Yeah, after posting that I noticed that the whole (Our internal stubby-alike passes a "Channel" interface, which is much narrower, and I got the two mixed up.) I think we've figured out workarounds for our use case, so I'll close this. Sorry for the noise. |
Yes, we had a lot of discussions with Go team and decided not to make ClientConn an interface (which is kinda common thing to do in other languages to support load balance channel). I think your requirements can be addressed once we have a good client interceptor solution. You can probably summarize your requirements and put it into a comment in the designdoc of the interceptor. |
I created a separate doc instead. |
The argument to NewFooClient() in the generated proto code (eg.
pb.NewGreeterClient(conn)
here) isgrpc.ClientConn
, a concrete struct type, rather than an interface.This prevents us from creating stubs against our own types. We'd like to (a) create a "client" object that has a collection of connections configured from a yaml config file, and dispatches
Call
s to the right connection based on service name, and (b) add interception on the client side.The text was updated successfully, but these errors were encountered: