Skip to content
Snippets Groups Projects
Commit ace78990 authored by vito.he's avatar vito.he
Browse files

Mod:rw problem

parent 851966eb
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ import (
import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/constant"
)
// ServiceDefinition is the describer of service definition
......@@ -77,11 +78,11 @@ func ServiceDescriperBuild(serviceName string, group string, version string) str
buf := &bytes.Buffer{}
if group != "" {
buf.WriteString(group)
buf.WriteString("/")
buf.WriteString(constant.PATH_SEPARATOR)
}
buf.WriteString(serviceName)
if version != "" && version != "0.0.0" {
buf.WriteString(":")
buf.WriteString(constant.KEY_SEPARATOR)
buf.WriteString(version)
}
return buf.String()
......
......@@ -67,7 +67,7 @@ func (mdi *BaseMetadataIdentifier) getFilePathKey(params ...string) string {
withPathSeparator(mdi.Version) +
withPathSeparator(mdi.Group) +
withPathSeparator(mdi.Side) +
joinParams("/", params)
joinParams(constant.PATH_SEPARATOR, params)
}
......@@ -88,7 +88,7 @@ func serviceToPath(serviceInterface string) string {
//withPathSeparator...
func withPathSeparator(path string) string {
if len(path) != 0 {
path = "/" + path
path = constant.PATH_SEPARATOR + path
}
return path
}
......@@ -62,11 +62,10 @@ func (exporter *MetadataServiceExporter) Export() error {
err := exporter.serviceConfig.Export()
logger.Infof("The MetadataService exports urls : %v ", exporter.serviceConfig.GetExportedUrls())
return err
} else {
logger.Warnf("The MetadataService has been exported : %v ", exporter.serviceConfig.GetExportedUrls())
return nil
}
logger.Warnf("The MetadataService has been exported : %v ", exporter.serviceConfig.GetExportedUrls())
return nil
}
// Unexport will unexport the metadataService
......
......@@ -61,8 +61,3 @@ type BaseMetadataService struct {
func (mts *BaseMetadataService) ServiceName() (string, error) {
return config.GetApplicationConfig().Name, nil
}
// RefreshMetadata is used for event listener's calling, to refresh metadata
//func (mts *BaseMetadataService) RefreshMetadata(exportedRevision string, subscribedRevision string) bool {
// return true
//}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment