applyFailingLBLocked is akin to configuring an LB policy on the channel which always fails RPCs. Here, an actual LB policy is not configured, but an always erroring picker is configured, which returns errors with information about what was invalid in the received service config. A config selector wi
(sc *serviceconfig.ParseResult)
| 878 | // service config is configured, and the connectivity state of the channel is |
| 879 | // set to TransientFailure. |
| 880 | func (cc *ClientConn) applyFailingLBLocked(sc *serviceconfig.ParseResult) { |
| 881 | var err error |
| 882 | if sc.Err != nil { |
| 883 | err = status.Errorf(codes.Unavailable, "error parsing service config: %v", sc.Err) |
| 884 | } else { |
| 885 | err = status.Errorf(codes.Unavailable, "illegal service config type: %T", sc.Config) |
| 886 | } |
| 887 | cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{nil}) |
| 888 | cc.pickerWrapper.updatePicker(base.NewErrPicker(err)) |
| 889 | cc.csMgr.updateState(connectivity.TransientFailure) |
| 890 | } |
| 891 | |
| 892 | // Makes a copy of the input addresses slice. Addresses are passed during |
| 893 | // subconn creation and address update operations. |
no test coverage detected