AlexStocks commented on a change in pull request #1161:
URL: https://github.com/apache/dubbo-go/pull/1161#discussion_r615306749
##########
File path: metadata/service/inmemory/metadata_service_proxy_factory.go
##########
@@ -31,10 +32,30 @@ import (
)
func init() {
- factory := service.NewBaseMetadataServiceProxyFactory(createProxy)
- extension.SetMetadataServiceProxyFactory(local, func()
service.MetadataServiceProxyFactory {
- return factory
+ extension.SetLocalMetadataService(constant.DEFAULT_KEY,
GetInMemoryMetadataService)
+ once = &sync.Once{}
+}
+
+var factory service.MetadataServiceProxyFactory
Review comment:
```go
var (
factory service.MetadataServiceProxyFactory
once *sync.Once
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]