type pickerGeneration … type pickerWrapper … func newPickerWrapper(statsHandlers []stats.Handler) *pickerWrapper { … } // updatePicker is called by UpdateState calls from the LB policy. It // unblocks all blocked pick. func (pw *pickerWrapper) updatePicker(p balancer.Picker) { … } // doneChannelzWrapper performs the following: // - increments the calls started channelz counter // - wraps the done function in the passed in result to increment the calls // failed or calls succeeded channelz counter before invoking the actual // done function. func doneChannelzWrapper(acbw *acBalancerWrapper, result *balancer.PickResult) { … } // pick returns the transport that will be used for the RPC. // It may block in the following cases: // - there's no picker // - the current picker returns ErrNoSubConnAvailable // - the current picker returns other errors and failfast is false. // - the subConn returned by the current picker is not READY // When one of these situations happens, pick blocks until the picker gets updated. func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, balancer.PickResult, error) { … } func (pw *pickerWrapper) close() { … } // reset clears the pickerWrapper and prepares it for being used again when idle // mode is exited. func (pw *pickerWrapper) reset() { … } type dropError …