NewAddress is called by the resolver implementation to send addresses to gRPC.
(addrs []resolver.Address)
| 161 | // NewAddress is called by the resolver implementation to send addresses to |
| 162 | // gRPC. |
| 163 | func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { |
| 164 | ccr.cc.mu.Lock() |
| 165 | ccr.mu.Lock() |
| 166 | if ccr.closed { |
| 167 | ccr.mu.Unlock() |
| 168 | ccr.cc.mu.Unlock() |
| 169 | return |
| 170 | } |
| 171 | s := resolver.State{ |
| 172 | Addresses: addrs, |
| 173 | ServiceConfig: ccr.curState.ServiceConfig, |
| 174 | Endpoints: addressesToEndpoints(addrs), |
| 175 | } |
| 176 | ccr.addChannelzTraceEvent(s) |
| 177 | ccr.curState = s |
| 178 | ccr.mu.Unlock() |
| 179 | ccr.cc.updateResolverStateAndUnlock(s, nil) |
| 180 | } |
| 181 | |
| 182 | // ParseServiceConfig is called by resolver implementations to parse a JSON |
| 183 | // representation of the service config. |
nothing calls this directly
no test coverage detected