mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-28 03:57:02 +02:00
fix: fix nacos.Register many endpoint metadata kind error (#1664)
* fix: fix nacos.Register metadata map type reference bug --user=sxpsxp12 * fix: fix golangci-link error Co-authored-by: songxiaopeng <xiaopeng.song@infwaves.com>
This commit is contained in:
parent
2471f1d955
commit
63a7ffae04
@ -101,6 +101,10 @@ func (r *Registry) Register(ctx context.Context, si *registry.ServiceInstance) e
|
||||
}
|
||||
si.Metadata["kind"] = u.Scheme
|
||||
si.Metadata["version"] = si.Version
|
||||
rmd := make(map[string]string)
|
||||
for k, v := range si.Metadata {
|
||||
rmd[k] = v
|
||||
}
|
||||
_, e := r.cli.RegisterInstance(vo.RegisterInstanceParam{
|
||||
Ip: host,
|
||||
Port: uint64(p),
|
||||
@ -109,7 +113,7 @@ func (r *Registry) Register(ctx context.Context, si *registry.ServiceInstance) e
|
||||
Enable: true,
|
||||
Healthy: true,
|
||||
Ephemeral: true,
|
||||
Metadata: si.Metadata,
|
||||
Metadata: rmd,
|
||||
ClusterName: r.opts.cluster,
|
||||
GroupName: r.opts.group,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user