Look in the gRPC source code for DirectAddressNameResolverFactory, which 
you can copy into your project.  This does what you want.

On Monday, August 20, 2018 at 1:11:41 PM UTC-7, eleano...@gmail.com wrote:
>
> Hi, 
>
> I would like to use the grpc java load balancing library, I looked at the 
> example code, it looks like below:
>
> public HelloWorldClient(String zkAddr) {
>   this(ManagedChannelBuilder.forTarget(zkAddr)
>       .loadBalancerFactory(RoundRobinLoadBalancerFactory.getInstance())
>       .nameResolverFactory(new ZkNameResolverProvider())
>       .usePlaintext(true));
> }
>
>
> I would like to pass ManagedChannelBuilder a list of service ip addresses 
> directly, rather than let a NameResolver to resolve for me. Then I still
>
> want to use .loadBalancerFactory(roundRobinLoadBalancerFactory.getInstance()),
>
>
> if there a way to do it ?
>
>
> Thanks a lot!
>
>

-- 
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/d88b4969-6f8d-4d0b-a483-20afb49592ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to