mirror of https://github.com/grpc/grpc-node.git
Update with changes from xDS Client PR
This commit is contained in:
parent
50b5af09ed
commit
044da58c76
|
@ -143,7 +143,7 @@ export class EdsLoadBalancer implements LoadBalancer {
|
||||||
(lbEndpoint) => {
|
(lbEndpoint) => {
|
||||||
/* The validator in the XdsClient class ensures that each endpoint has
|
/* The validator in the XdsClient class ensures that each endpoint has
|
||||||
* a socket_address with an IP address and a port_value. */
|
* a socket_address with an IP address and a port_value. */
|
||||||
const socketAddress = lbEndpoint.endpoint!.address.socket_address!;
|
const socketAddress = lbEndpoint.endpoint!.address!.socket_address!;
|
||||||
return {
|
return {
|
||||||
host: socketAddress.address!,
|
host: socketAddress.address!,
|
||||||
port: socketAddress.port_value!,
|
port: socketAddress.port_value!,
|
||||||
|
@ -151,12 +151,12 @@ export class EdsLoadBalancer implements LoadBalancer {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
localityArray.push({
|
localityArray.push({
|
||||||
locality: endpoint.locality,
|
locality: endpoint.locality!,
|
||||||
addresses: addresses,
|
addresses: addresses,
|
||||||
weight: endpoint.load_balancing_weight.value,
|
weight: endpoint.load_balancing_weight?.value ?? 0,
|
||||||
});
|
});
|
||||||
newLocalityPriorities.set(
|
newLocalityPriorities.set(
|
||||||
localityToName(endpoint.locality),
|
localityToName(endpoint.locality!),
|
||||||
endpoint.priority
|
endpoint.priority
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue