-
Notifications
You must be signed in to change notification settings - Fork 157
feat: supports nacos service discovery #651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: supports nacos service discovery #651
Conversation
pkg/adapter/dubboregistry/registry/nacos/application_listener.go
Outdated
Show resolved
Hide resolved
pkg/adapter/dubboregistry/registry/nacos/application_listener.go
Outdated
Show resolved
Hide resolved
pkg/adapter/dubboregistry/registry/nacos/application_service_listener.go
Show resolved
Hide resolved
add samples on https://github.com/apache/dubbo-go-pixiu-samples |
merge this PR firstly? |
|
||
go func(v *serviceInfo) { | ||
defer l.wg.Done() | ||
n.serviceInfoMap[key] = svcInfo | ||
|
||
sub := &vo.SubscribeParam{ | ||
ServiceName: getSubscribeName(url), | ||
SubscribeCallback: l.Callback, | ||
GroupName: z.regConf.Group, | ||
} | ||
sub := &vo.SubscribeParam{ | ||
ServiceName: getSubscribeName(url), | ||
SubscribeCallback: l.Callback, | ||
GroupName: n.regConf.Group, | ||
} | ||
|
||
if err := z.client.Subscribe(sub); err != nil { | ||
logger.Errorf("subscribe listener with interfaceKey = %s, error = %s", l, err) | ||
} | ||
}(svcInfo) | ||
if err := n.client.Subscribe(sub); err != nil { | ||
logger.Errorf("subscribe listener with interfaceKey = %s, error = %s", l, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove this goroutine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the Subscribe is no-block func.
There is no need to keep the goroutine.
LGTM |
pkg/adapter/dubboregistry/registry/nacos/application_listener.go
Outdated
Show resolved
Hide resolved
https://github.com/apache/dubbo-go-pixiu-samples/blob/37ae24e5ef289e11691deb47bc5e19b2d413d97e/dubbogo/simple/nacos/pixiu/conf.yaml#L43 Change this line to application, then testing can proceed.
|
LGTM |
1 similar comment
LGTM |
|
What this PR does:
supports nacos service discovery
Which issue(s) this PR fixes:
none
Special notes for your reviewer:
Does this PR introduce a user-facing change?: