This is an automated email from the ASF dual-hosted git repository.

laurence pushed a commit to branch config-enhance
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/config-enhance by this push:
     new 202ad43  fix metadata bug (#1431)
202ad43 is described below

commit 202ad43ebafe56431501e97482a64b7c04cbe13f
Author: alchemy-lee <[email protected]>
AuthorDate: Fri Sep 3 13:03:05 2021 +0800

    fix metadata bug (#1431)
---
 config/config_loader.go | 4 ++++
 imports/imports.go      | 1 +
 2 files changed, 5 insertions(+)

diff --git a/config/config_loader.go b/config/config_loader.go
index 57b9d34..1545c85 100644
--- a/config/config_loader.go
+++ b/config/config_loader.go
@@ -376,6 +376,10 @@ func registerServiceInstance() {
                        panic(err)
                }
        }
+       // publish metadata to remote
+       if remoteMetadataService, err := extension.GetRemoteMetadataService(); 
err == nil {
+               
remoteMetadataService.PublishMetadata(GetApplicationConfig().Name)
+       }
 }
 
 //
diff --git a/imports/imports.go b/imports/imports.go
index 661269d..4d2d86b 100644
--- a/imports/imports.go
+++ b/imports/imports.go
@@ -8,6 +8,7 @@ import (
        _ "dubbo.apache.org/dubbo-go/v3/config_center/nacos"
        _ "dubbo.apache.org/dubbo-go/v3/config_center/zookeeper"
        _ "dubbo.apache.org/dubbo-go/v3/filter/filter_impl"
+       _ "dubbo.apache.org/dubbo-go/v3/metadata/mapping/dynamic"
        _ "dubbo.apache.org/dubbo-go/v3/metadata/report/etcd"
        _ "dubbo.apache.org/dubbo-go/v3/metadata/report/nacos"
        _ "dubbo.apache.org/dubbo-go/v3/metadata/report/zookeeper"

Reply via email to