close initiates async shutdown of the wrapper. To determine the wrapper has finished shutting down, the channel should block on ccr.serializer.Done() without cc.mu held.
()
| 109 | // finished shutting down, the channel should block on ccr.serializer.Done() |
| 110 | // without cc.mu held. |
| 111 | func (ccr *ccResolverWrapper) close() { |
| 112 | channelz.Info(logger, ccr.cc.channelz, "Closing the name resolver") |
| 113 | ccr.mu.Lock() |
| 114 | ccr.closed = true |
| 115 | ccr.mu.Unlock() |
| 116 | |
| 117 | ccr.serializer.TrySchedule(func(context.Context) { |
| 118 | if ccr.resolver == nil { |
| 119 | return |
| 120 | } |
| 121 | ccr.resolver.Close() |
| 122 | ccr.resolver = nil |
| 123 | }) |
| 124 | ccr.serializerCancel() |
| 125 | } |
| 126 | |
| 127 | // UpdateState is called by resolver implementations to report new state to gRPC |
| 128 | // which includes addresses and service config. |
nothing calls this directly
no test coverage detected