Skip to content

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

Merged
merged 9 commits into from
Mar 9, 2025

Conversation

marsevilspirit
Copy link
Contributor

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?:

no

@mark4z
Copy link
Member

mark4z commented Mar 1, 2025

@AlexStocks
Copy link
Contributor

add samples on https://github.com/apache/dubbo-go-pixiu-samples

merge this PR firstly?

Comment on lines -169 to +175

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this goroutine

Copy link
Contributor Author

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.

@No-SilverBullet
Copy link
Member

LGTM

@marsevilspirit
Copy link
Contributor Author

@mark4z
Copy link
Member

mark4z commented Mar 7, 2025

LGTM

1 similar comment
@FoghostCn
Copy link
Contributor

LGTM

Copy link

sonarqubecloud bot commented Mar 8, 2025

@baerwang baerwang merged commit f2773ea into apache:develop Mar 9, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants