grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

cleanup: Add child balancer in stub.BalancerData

Open arjan-bal opened this issue 5 months ago • 1 comments

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.

arjan-bal avatar May 30 '25 04:05 arjan-bal