Please consider a more descriptive status field in data returned by /v1/agent/members
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Hi!
First of all, thanks for making and releasing Consul, it looks very very useful. =)
I was stumped for a bit by the Status field in the JSON objects returned by /v1/agent/members, though. I couldn't find it documented anywhere, and even though toying around a little strongly suggested that 1 meant "alive" and 4 meant "failed", I really wanted to know for sure before depending on it. Chasing through a bit of code led me to https://github.com/hashicorp/serf/blob/master/serf/serf.go#L143 which - together with https://golang.org/ref/spec#Iota for those of us who don't know golang - makes the constant values clear.
But still, this looks like a Serf implementation detail accidentally leaking through the Consul API. Would you prefer to document the values in the API docs or to add a StatusString or StatusText field to the JSON API objects? Changing the Status field from an int to a string would perhaps match the rest of the API better, but I guess I'm not the only one who went ahead and wrote some Python to work with the integer constants. =)
Thanks,
-AndersM
Contributor guide
Assessment
This issue has not been assessed yet.