mirror of https://github.com/grpc/grpc-java.git
Enable LB and Naming for Netty.forAddress(String,int)
This swaps to the forTarget() codepath. The constructor is to make it more convenient when extending the builder to disable checkAuthority.
This commit is contained in:
parent
01bf56bf8d
commit
76eaae26b8
|
|
@ -89,7 +89,7 @@ public class NettyChannelBuilder extends AbstractManagedChannelImplBuilder<Netty
|
|||
* Creates a new builder with the given host and port.
|
||||
*/
|
||||
public static NettyChannelBuilder forAddress(String host, int port) {
|
||||
return forAddress(new InetSocketAddress(host, port));
|
||||
return new NettyChannelBuilder(host, port);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -100,6 +100,10 @@ public class NettyChannelBuilder extends AbstractManagedChannelImplBuilder<Netty
|
|||
return new NettyChannelBuilder(target);
|
||||
}
|
||||
|
||||
protected NettyChannelBuilder(String host, int port) {
|
||||
this(GrpcUtil.authorityFromHostAndPort(host, port));
|
||||
}
|
||||
|
||||
private NettyChannelBuilder(String target) {
|
||||
super(target);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue