{"action":"created","issue":{"url":"https://api.github.com/repos/grpc/grpc-go/issues/397","labels_url":"https://api.github.com/repos/grpc/grpc-go/issues/397/labels{/name}","comments_url":"https://api.github.com/repos/grpc/grpc-go/issues/397/comments","events_url":"https://api.github.com/repos/grpc/grpc-go/issues/397/events","html_url":"https://github.com/grpc/grpc-go/pull/397","id":110876504,"number":397,"title":"cleanup references to `Picker` through `dopts`","user":{"login":"mwitkow-io","id":9655971,"avatar_url":"https://avatars.githubusercontent.com/u/9655971?v=3","gravatar_id":"","url":"https://api.github.com/users/mwitkow-io","html_url":"https://github.com/mwitkow-io","followers_url":"https://api.github.com/users/mwitkow-io/followers","following_url":"https://api.github.com/users/mwitkow-io/following{/other_user}","gists_url":"https://api.github.com/users/mwitkow-io/gists{/gist_id}","starred_url":"https://api.github.com/users/mwitkow-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwitkow-io/subscriptions","organizations_url":"https://api.github.com/users/mwitkow-io/orgs","repos_url":"https://api.github.com/users/mwitkow-io/repos","events_url":"https://api.github.com/users/mwitkow-io/events{/privacy}","received_events_url":"https://api.github.com/users/mwitkow-io/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-11T18:52:10Z","updated_at":"2015-10-11T20:05:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/grpc/grpc-go/pulls/397","html_url":"https://github.com/grpc/grpc-go/pull/397","diff_url":"https://github.com/grpc/grpc-go/pull/397.diff","patch_url":"https://github.com/grpc/grpc-go/pull/397.patch"},"body":"While working on a Reverse Proxy for gRPC (https://github.com/mwitkow-io/grpc-proxy) I stumbled with the problem of getting a new `ClientTransport` and a new `ClientStream` in raw form.\r\nThat's because the Reverse Proxy skips framing and only operates on metadata of the call.\r\n\r\nOne of the ways to do it was to expose the `Picker` as an interface of `ClientConn`, which this CL is.\r\nAlternatively, a `NewTransport` method could be added to `ClientConn` that hides the Picker completely."},"comment":{"url":"https://api.github.com/repos/grpc/grpc-go/issues/comments/147240810","html_url":"https://github.com/grpc/grpc-go/pull/397#issuecomment-147240810","issue_url":"https://api.github.com/repos/grpc/grpc-go/issues/397","id":147240810,"user":{"login":"iamqizhao","id":10121772,"avatar_url":"https://avatars.githubusercontent.com/u/10121772?v=3","gravatar_id":"","url":"https://api.github.com/users/iamqizhao","html_url":"https://github.com/iamqizhao","followers_url":"https://api.github.com/users/iamqizhao/followers","following_url":"https://api.github.com/users/iamqizhao/following{/other_user}","gists_url":"https://api.github.com/users/iamqizhao/gists{/gist_id}","starred_url":"https://api.github.com/users/iamqizhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamqizhao/subscriptions","organizations_url":"https://api.github.com/users/iamqizhao/orgs","repos_url":"https://api.github.com/users/iamqizhao/repos","events_url":"https://api.github.com/users/iamqizhao/events{/privacy}","received_events_url":"https://api.github.com/users/iamqizhao/received_events","type":"User","site_admin":false},"created_at":"2015-10-11T20:05:23Z","updated_at":"2015-10-11T20:05:23Z","body":"Exposing transport. CientTransport to Picker is not the way to go. Pick\ncould implement various load balancing policies such as round robin in\nwhich case the ClientTransport you get from Picker() is meaningless. I\nexpect the proxy dev should use transport package directly and implement\nthe custom upper logic (may or may not be as same as what ClientConn does).\n\nOn Sun, Oct 11, 2015 at 12:22 PM, Michal Witkowski <notifications@github.com\n> wrote:\n\n> For reference:\n> https://github.com/mwitkow-io/grpc-proxy/blob/master/proxy.go#L187\n>\n> I can't rely on getting the Picker from the user, as the public interface\n> for \"dialing\" is ClientConn. Thus, I made ClientConn the interface I\n> expect the users of the gRPC proxy to use to specify the destinations of\n> their RPCs.\n>\n> Basically the problem I'm facing is there is no way of getting a\n> transport.ClientTransport out of the ClientConn, which is needed for raw\n> shoveling of data frames.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/grpc/grpc-go/pull/397#issuecomment-147237455>.\n>\n"}}