You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when we use the Golang client api and call the method "Catalog().Nodes()" we can only see the Node name and ip address but remaining information along with advertise wan ip is missing.
Reason for this is the node struct used in the Catalog.go which is as below:
type Node struct {
Node string
Address string
}
But if we check the structs.go under consul/structs, we find the correct node struct:
I'll take this one. I also realized that after #2275 there's no way to get the LAN address if translation is turned on, so I'll add a "lan" tag as well as part of this change.
slackpad
changed the title
Golang client API output is different to http api when querying for nodes information in a datacenter
Golang client API client is missing support for TaggedAddresses
Aug 16, 2016
Also @pradeepnss you may want to take a look at #2275 that may provide what you are looking for without needing to access the tagged addresses directly.
consul version
for both Client and ServerClient: 0.6.4
Server: 0.6.4
Description of the Issue (and unexpected/desired result)
When we query nodes in datacenter using consul http api (http://localhost:8500/v1/catalog/nodes) we can see the advertise wan ip as part of the output.
But when we use the Golang client api and call the method "Catalog().Nodes()" we can only see the Node name and ip address but remaining information along with advertise wan ip is missing.
Reason for this is the node struct used in the Catalog.go which is as below:
But if we check the structs.go under consul/structs, we find the correct node struct:
Question is posted on consul google forum (https://groups.google.com/forum/#!topic/consul-tool/sqe_o3J2A7w) and it is confirmed by James Phillip that it was just an oversight.
The text was updated successfully, but these errors were encountered: