Skip to content
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

optimize: the registered address #90

Merged
merged 2 commits into from
Sep 26, 2023
Merged

Conversation

Skyenought
Copy link
Member

@Skyenought Skyenought commented Sep 26, 2023

What type of PR is this?

optimize

What this PR does / why we need it (English/Chinese):

添加根据 环境变量 动态获取 ip port 的能力

Which issue(s) this PR fixes:

@Skyenought Skyenought changed the title [wip] optimize: the registered address optimize: the registered address Sep 26, 2023
etcd/registry.go Outdated Show resolved Hide resolved
etcd/registry.go Outdated Show resolved Hide resolved
Copy link
Member

@a631807682 a631807682 left a comment

Choose a reason for hiding this comment

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

https://github.com/hertz-contrib/registry/pull/90/files#diff-b3ac597ed93b27ef58d5181e8dc8fc7f42b5d07fb2170fba0725bd6044bfafa1L126
register 的 serviceKey 里面没改

-	_, err = e.etcdClient.Put(ctx, serviceKey(info.ServiceName, info.Addr.String()), string(val), clientv3.WithLease(leaseID))
+	_, err = e.etcdClient.Put(ctx, serviceKey(info.ServiceName, addr), string(val), clientv3.WithLease(leaseID))

@Skyenought
Copy link
Member Author

https://github.com/hertz-contrib/registry/pull/90/files#diff-b3ac597ed93b27ef58d5181e8dc8fc7f42b5d07fb2170fba0725bd6044bfafa1L126 register 的 serviceKey 里面没改

-	_, err = e.etcdClient.Put(ctx, serviceKey(info.ServiceName, info.Addr.String()), string(val), clientv3.WithLease(leaseID))
+	_, err = e.etcdClient.Put(ctx, serviceKey(info.ServiceName, addr), string(val), clientv3.WithLease(leaseID))

我太马虎了

etcd/registry.go Outdated Show resolved Hide resolved
@li-jin-gou
Copy link
Collaborator

lgtm

@li-jin-gou li-jin-gou merged commit cab5b29 into hertz-contrib:main Sep 26, 2023
11 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.

3 participants