grpc-go
grpc-go copied to clipboard
cleanup: Add child balancer in stub.BalancerData
Almost all references of BalancerData.Data are storing child balancers in it. This field is of type any, so callers have to cast it to a balancer.Balancer before every access. Example:
https://github.com/grpc/grpc-go/blob/4275c5bdd8e86c450d84f66c9445560fefadc4ec/internal/idle/idle_e2e_test.go#L103-L106
We should introduce a new field of type Balancer to make using the stub balancer more ergonomic. We should update existing usages use the new field wherever possible.