use of io.envoyproxy.envoy.config.endpoint.v3.LocalityLbEndpoints in project grpc-java by grpc.
the class FakeControlPlaneXdsIntegrationTest method eds.
private static ClusterLoadAssignment eds(String hostName, int port) {
Address address = Address.newBuilder().setSocketAddress(SocketAddress.newBuilder().setAddress(hostName).setPortValue(port).build()).build();
LocalityLbEndpoints endpoints = LocalityLbEndpoints.newBuilder().setLoadBalancingWeight(UInt32Value.of(10)).setPriority(0).addLbEndpoints(LbEndpoint.newBuilder().setEndpoint(Endpoint.newBuilder().setAddress(address).build()).setHealthStatus(HealthStatus.HEALTHY).build()).build();
return ClusterLoadAssignment.newBuilder().setClusterName(edsName).addEndpoints(endpoints).build();
}
Aggregations