| 183 | } |
| 184 | |
| 185 | type pickfirstBalancer struct { |
| 186 | // The following fields are initialized at build time and read-only after |
| 187 | // that and therefore do not need to be guarded by a mutex. |
| 188 | logger *internalgrpclog.PrefixLogger |
| 189 | cc balancer.ClientConn |
| 190 | target string |
| 191 | metricsRecorder expstats.MetricsRecorder // guaranteed to be non nil |
| 192 | |
| 193 | // The mutex is used to ensure synchronization of updates triggered |
| 194 | // from the idle picker and the already serialized resolver, |
| 195 | // SubConn state updates. |
| 196 | mu sync.Mutex |
| 197 | // State reported to the channel based on SubConn states and resolver |
| 198 | // updates. |
| 199 | state connectivity.State |
| 200 | // scData for active subonns mapped by address. |
| 201 | subConns *resolver.AddressMapV2[*scData] |
| 202 | addressList addressList |
| 203 | firstPass bool |
| 204 | numTF int |
| 205 | cancelConnectionTimer func() |
| 206 | healthCheckingEnabled bool |
| 207 | } |
| 208 | |
| 209 | // ResolverError is called by the ClientConn when the name resolver produces |
| 210 | // an error or when pickfirst determined the resolver update to be invalid. |
nothing calls this directly
no outgoing calls
no test coverage detected