type ccResolverWrapper … // newCCResolverWrapper initializes the ccResolverWrapper. It can only be used // after calling start, which builds the resolver. func newCCResolverWrapper(cc *ClientConn) *ccResolverWrapper { … } // start builds the name resolver using the resolver.Builder in cc and returns // any error encountered. It must always be the first operation performed on // any newly created ccResolverWrapper, except that close may be called instead. func (ccr *ccResolverWrapper) start() error { … } func (ccr *ccResolverWrapper) resolveNow(o resolver.ResolveNowOptions) { … } // 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. func (ccr *ccResolverWrapper) close() { … } // UpdateState is called by resolver implementations to report new state to gRPC // which includes addresses and service config. func (ccr *ccResolverWrapper) UpdateState(s resolver.State) error { … } // ReportError is called by resolver implementations to report errors // encountered during name resolution to gRPC. func (ccr *ccResolverWrapper) ReportError(err error) { … } // NewAddress is called by the resolver implementation to send addresses to // gRPC. func (ccr *ccResolverWrapper) NewAddress(addrs []resolver.Address) { … } // ParseServiceConfig is called by resolver implementations to parse a JSON // representation of the service config. func (ccr *ccResolverWrapper) ParseServiceConfig(scJSON string) *serviceconfig.ParseResult { … } // addChannelzTraceEvent adds a channelz trace event containing the new // state received from resolver implementations. func (ccr *ccResolverWrapper) addChannelzTraceEvent(s resolver.State) { … }