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

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


The following commit(s) were added to refs/heads/hsf-go-dependency by this push:
     new 226dd1d  fix: remove generic filter from default, add stop auto 
publish metadata config.
226dd1d is described below

commit 226dd1d0bc13734cbe79306b8a7edac65d1533bb
Author: lizhixin.lzx <[email protected]>
AuthorDate: Mon Oct 11 15:01:58 2021 +0800

    fix: remove generic filter from default, add stop auto publish metadata 
config.
---
 common/constant/default.go | 2 +-
 config/service_config.go   | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/common/constant/default.go b/common/constant/default.go
index 1596f9f..77b809e 100644
--- a/common/constant/default.go
+++ b/common/constant/default.go
@@ -51,7 +51,7 @@ const (
 const (
        DEFAULT_KEY               = "default"
        PREFIX_DEFAULT_KEY        = "default."
-       DEFAULT_SERVICE_FILTERS   = 
"token,accesslog,tps,generic_service,execute,pshutdown"
+       DEFAULT_SERVICE_FILTERS   = "token,accesslog,tps,execute,pshutdown"
        DEFAULT_REFERENCE_FILTERS = "cshutdown"
        GENERIC_REFERENCE_FILTERS = "generic"
        GENERIC                   = "$invoke"
diff --git a/config/service_config.go b/config/service_config.go
index d73190c..532dca1 100644
--- a/config/service_config.go
+++ b/config/service_config.go
@@ -74,6 +74,9 @@ type ServiceConfig struct {
        ParamSign                   string            `yaml:"param.sign" 
json:"param.sign,omitempty" property:"param.sign"`
        Tag                         string            `yaml:"tag" 
json:"tag,omitempty" property:"tag"`
        GrpcMaxMessageSize          int               `default:"4" 
yaml:"max_message_size" json:"max_message_size,omitempty"`
+       // StopAutoPublishServiceMetadata is used by dapr raw service, which 
could stop auto metadata report of dubbo-go,
+       // and report raw metadata by api invocation.
+       StopAutoPublishServiceMetadata bool
 
        Protocols     map[string]*ProtocolConfig
        unexported    *atomic.Bool
@@ -234,7 +237,10 @@ func (c *ServiceConfig) Export() error {
                        }
                        c.exporters = append(c.exporters, exporter)
                }
-               publishServiceDefinition(ivkURL)
+
+               if !c.StopAutoPublishServiceMetadata {
+                       publishServiceDefinition(ivkURL)
+               }
        }
        c.exported.Store(true)
        return nil

Reply via email to