mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Don't allow null load balancing configs
This commit is contained in:
parent
6e202e0b53
commit
7aa9177fa3
@ -84,12 +84,9 @@ export class ChildLoadBalancerHandler implements LoadBalancer {
|
||||
*/
|
||||
updateAddressList(
|
||||
addressList: SubchannelAddress[],
|
||||
lbConfig: LoadBalancingConfig | null,
|
||||
lbConfig: LoadBalancingConfig,
|
||||
attributes: { [key: string]: unknown }
|
||||
): void {
|
||||
if (lbConfig === null) {
|
||||
return;
|
||||
}
|
||||
let childToUpdate: LoadBalancer;
|
||||
if (
|
||||
this.currentChild === null ||
|
||||
|
||||
@ -383,7 +383,7 @@ export class PickFirstLoadBalancer implements LoadBalancer {
|
||||
|
||||
updateAddressList(
|
||||
addressList: SubchannelAddress[],
|
||||
lbConfig: LoadBalancingConfig | null
|
||||
lbConfig: LoadBalancingConfig
|
||||
): void {
|
||||
// lbConfig has no useful information for pick first load balancing
|
||||
/* To avoid unnecessary churn, we only do something with this address list
|
||||
|
||||
@ -189,7 +189,7 @@ export class RoundRobinLoadBalancer implements LoadBalancer {
|
||||
|
||||
updateAddressList(
|
||||
addressList: SubchannelAddress[],
|
||||
lbConfig: LoadBalancingConfig | null
|
||||
lbConfig: LoadBalancingConfig
|
||||
): void {
|
||||
this.resetSubchannelList();
|
||||
trace(
|
||||
|
||||
@ -67,7 +67,7 @@ export interface LoadBalancer {
|
||||
*/
|
||||
updateAddressList(
|
||||
addressList: SubchannelAddress[],
|
||||
lbConfig: LoadBalancingConfig | null,
|
||||
lbConfig: LoadBalancingConfig,
|
||||
attributes: { [key: string]: unknown }
|
||||
): void;
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user