Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
ad8a8ad9
Commit
ad8a8ad9
authored
4 years ago
by
cvictory
Browse files
Options
Downloads
Patches
Plain Diff
fix metadata report fail
parent
b8f21c49
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/service_config.go
+18
-0
18 additions, 0 deletions
config/service_config.go
with
18 additions
and
0 deletions
config/service_config.go
+
18
−
0
View file @
ad8a8ad9
...
...
@@ -40,10 +40,13 @@ import (
"github.com/apache/dubbo-go/common/constant"
"github.com/apache/dubbo-go/common/extension"
"github.com/apache/dubbo-go/common/logger"
"github.com/apache/dubbo-go/metadata/service"
"github.com/apache/dubbo-go/protocol"
"github.com/apache/dubbo-go/protocol/protocolwrapper"
)
var
remoteMetadataService
service
.
MetadataService
// ServiceConfig is the configuration of the service provider
type
ServiceConfig
struct
{
context
context
.
Context
...
...
@@ -223,6 +226,7 @@ func (c *ServiceConfig) Export() error {
}
c
.
exporters
=
append
(
c
.
exporters
,
exporter
)
}
PublishServiceDefinition
(
ivkURL
)
}
c
.
exported
.
Store
(
true
)
return
nil
...
...
@@ -332,3 +336,17 @@ func (c *ServiceConfig) GetExportedUrls() []*common.URL {
}
return
nil
}
func
PublishServiceDefinition
(
url
*
common
.
URL
)
{
if
remoteMetadataService
==
nil
{
var
err
error
if
remoteMetadataService
,
err
=
extension
.
GetMetadataService
(
"remote"
);
err
!=
nil
{
logger
.
Warnf
(
"get remote metadataService fail. %v"
,
err
)
return
}
else
if
remoteMetadataService
==
nil
{
logger
.
Info
(
"get remote metadataService will nil."
)
return
}
}
remoteMetadataService
.
PublishServiceDefinition
(
url
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment