I've used ManagedChannelBuilder.overrideAuthority() to point to a proxy 
without issue. I don't know if that's "supported", but it works.

On Wednesday, August 9, 2017 at 1:56:05 PM UTC-7, vadim....@gmail.com wrote:
>
> Hello,
>
> What's the right way to override authority for a channel or stub?
>
> I see there is withAuthority method in CallOptions, but there is no 
> withAuthority method in AbstractStub and I cannot pass CallOptions to 
> generated stubs.
>
> There is overrideAuthority method in ManagedChannelBuilder class, but the 
> comment says "Should only used by tests".
>
> In gRPC C# I can do something like that:
>
> var channel = new Channel(
>     "myproxy:4140",
>     ChannelCredentials.Insecure,
>     new []{new ChannelOption(ChannelOptions.DefaultAuthority, 
> "original-authority")});
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/c966356b-761f-4437-a4f7-a2e0068a881b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to