Skip to content

cleanup: Add child balancer in stub.BalancerData #8371

Closed
@arjan-bal

Description

@arjan-bal

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:

UpdateClientConnState: func(bd *stub.BalancerData, ccs balancer.ClientConnState) error {
bal := bd.Data.(balancer.Balancer)
return bal.UpdateClientConnState(ccs)
},

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions