Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22a7f0099
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22a7f0099
Commits
f29887eb
Commit
f29887eb
authored
Apr 8, 2020
by
vito.he
Browse files
Options
Downloads
Plain Diff
Merge branch 'extension_directory' of
https://github.com/hxmhlt/dubbo-go
into extension_directory
parents
e7d1043a
24fe5d0b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
registry/directory/directory.go
+4
-4
4 additions, 4 deletions
registry/directory/directory.go
with
4 additions
and
4 deletions
registry/directory/directory.go
+
4
−
4
View file @
f29887eb
...
...
@@ -90,7 +90,7 @@ func (dir *RegistryDirectory) Notify(event *registry.ServiceEvent) {
go
dir
.
update
(
event
)
}
// update
:
subscribe service from registry
, and update the cacheServices
// update
the cacheServices and
subscribe service from registry
func
(
dir
*
RegistryDirectory
)
update
(
res
*
registry
.
ServiceEvent
)
{
if
res
==
nil
{
return
...
...
@@ -187,7 +187,7 @@ func (dir *RegistryDirectory) toGroupInvokers() []protocol.Invoker {
return
groupInvokersList
}
// uncacheInvoker
:
return abandoned Invoker,if no Invoker to be abandoned,return nil
// uncacheInvoker
will
return abandoned Invoker,if no Invoker to be abandoned,return nil
func
(
dir
*
RegistryDirectory
)
uncacheInvoker
(
url
*
common
.
URL
)
protocol
.
Invoker
{
logger
.
Debugf
(
"service will be deleted in cache invokers: invokers key is %s!"
,
url
.
Key
())
if
cacheInvoker
,
ok
:=
dir
.
cacheInvokersMap
.
Load
(
url
.
Key
());
ok
{
...
...
@@ -197,7 +197,7 @@ func (dir *RegistryDirectory) uncacheInvoker(url *common.URL) protocol.Invoker {
return
nil
}
// cacheInvoker
:
return abandoned Invoker,if no Invoker to be abandoned,return nil
// cacheInvoker
will
return abandoned Invoker,if no Invoker to be abandoned,return nil
func
(
dir
*
RegistryDirectory
)
cacheInvoker
(
url
*
common
.
URL
)
protocol
.
Invoker
{
dir
.
overrideUrl
(
dir
.
GetDirectoryUrl
())
referenceUrl
:=
dir
.
GetDirectoryUrl
()
.
SubURL
...
...
@@ -233,7 +233,7 @@ func (dir *RegistryDirectory) cacheInvoker(url *common.URL) protocol.Invoker {
return
nil
}
//
l
ist
:
select
th
e protocol invokers from the directory
//
L
ist selecte
d
protocol invokers from the directory
func
(
dir
*
RegistryDirectory
)
List
(
invocation
protocol
.
Invocation
)
[]
protocol
.
Invoker
{
invokers
:=
dir
.
cacheInvokers
routerChain
:=
dir
.
RouterChain
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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