AlexStocks commented on a change in pull request #1161:
URL: https://github.com/apache/dubbo-go/pull/1161#discussion_r615338673
##########
File path: metadata/service/inmemory/service_proxy.go
##########
@@ -60,13 +60,33 @@ func (m *MetadataServiceProxy)
GetExportedURLs(serviceInterface string, group st
res := m.invkr.Invoke(context.Background(), inv)
if res.Error() != nil {
logger.Errorf("could not get the metadata service from remote
provider: %v", res.Error())
- return []interface{}{}, nil
+ return []*common.URL{}, nil
}
- urlStrs := res.Result().(*[]interface{})
+ urlStrs := res.Result().([]string)
+ ret := make([]*common.URL, 0, len(urlStrs))
+ for _, v := range urlStrs {
+ tempURL, err := common.NewURL(v)
+ if err != nil {
+ return []*common.URL{}, err
+ }
+ ret = append(ret, tempURL)
+ }
+ return ret, nil
+}
+
+func (m *MetadataServiceProxy) GetExportedServiceURLs() []*common.URL {
+ logger.Error("you should never invoke this implementation")
+ return nil
+}
+
+func (m *MetadataServiceProxy) GetMetadataServiceURL() *common.URL {
Review comment:
// todo
##########
File path: metadata/service/inmemory/service_proxy.go
##########
@@ -60,13 +60,33 @@ func (m *MetadataServiceProxy)
GetExportedURLs(serviceInterface string, group st
res := m.invkr.Invoke(context.Background(), inv)
if res.Error() != nil {
logger.Errorf("could not get the metadata service from remote
provider: %v", res.Error())
- return []interface{}{}, nil
+ return []*common.URL{}, nil
}
- urlStrs := res.Result().(*[]interface{})
+ urlStrs := res.Result().([]string)
+ ret := make([]*common.URL, 0, len(urlStrs))
+ for _, v := range urlStrs {
+ tempURL, err := common.NewURL(v)
+ if err != nil {
+ return []*common.URL{}, err
+ }
+ ret = append(ret, tempURL)
+ }
+ return ret, nil
+}
+
+func (m *MetadataServiceProxy) GetExportedServiceURLs() []*common.URL {
Review comment:
// todo
##########
File path: metadata/service/inmemory/service_proxy.go
##########
@@ -60,13 +60,33 @@ func (m *MetadataServiceProxy)
GetExportedURLs(serviceInterface string, group st
res := m.invkr.Invoke(context.Background(), inv)
if res.Error() != nil {
logger.Errorf("could not get the metadata service from remote
provider: %v", res.Error())
- return []interface{}{}, nil
+ return []*common.URL{}, nil
}
- urlStrs := res.Result().(*[]interface{})
+ urlStrs := res.Result().([]string)
+ ret := make([]*common.URL, 0, len(urlStrs))
+ for _, v := range urlStrs {
+ tempURL, err := common.NewURL(v)
+ if err != nil {
+ return []*common.URL{}, err
+ }
+ ret = append(ret, tempURL)
+ }
+ return ret, nil
+}
+
+func (m *MetadataServiceProxy) GetExportedServiceURLs() []*common.URL {
+ logger.Error("you should never invoke this implementation")
+ return nil
+}
+
+func (m *MetadataServiceProxy) GetMetadataServiceURL() *common.URL {
+ logger.Error("you should never invoke this implementation")
+ return nil
+}
- ret := make([]interface{}, 0, len(*urlStrs))
- return append(ret, *urlStrs...), nil
+func (m *MetadataServiceProxy) SetMetadataServiceURL(*common.URL) {
Review comment:
// todo
##########
File path: metadata/service/inmemory/service_proxy.go
##########
@@ -132,3 +152,20 @@ func (m *MetadataServiceProxy) Version() (string, error) {
logger.Error("you should never invoke this implementation")
return "", nil
}
+
+func (m *MetadataServiceProxy) GetMetadataInfo(revision string)
(*common.MetadataInfo, error) {
Review comment:
// todo
--
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]