Skip to content

Comments

fix(sd): support ipv6 for consul and eureka#1274

Open
tony612 wants to merge 1 commit intogo-kit:masterfrom
tony612:fix-consul-ipv6
Open

fix(sd): support ipv6 for consul and eureka#1274
tony612 wants to merge 1 commit intogo-kit:masterfrom
tony612:fix-consul-ipv6

Conversation

@tony612
Copy link

@tony612 tony612 commented Sep 14, 2023

Now IPv6 + port in instances will be string like 2001:db8:1::ab9:C0A8:102:8000(8000 is the port) for consul and eureka. The correct instance should be like [2001:db8:1::ab9:C0A8:102]:8000, otherwise the HTTP call will fail.

I also checked other sd. It's correct in dnssrv already:

instances[i] = net.JoinHostPort(addr.Target, fmt.Sprint(addr.Port))

Other sd seem don't have this problem either like etcd and zk.

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.

1 participant