-
Notifications
You must be signed in to change notification settings - Fork 2k
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
api: add missing AllocDirStats
field in Go API
#20261
Conversation
The JSON response for the Read Stats client API includes an `AllocDirStats` field. This field is missing in the `api` package, so consumers of the Go API can't use it to read the values we're getting back from the HTTP server. Fixes: #20246
29504a1
to
b8856eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
c.DevMode = true | ||
}) | ||
defer s.Stop() | ||
nodesAPI := c.Nodes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah this is one of those little "node" vs "client" battlegrounds, eh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah c
is the Go API client, and c.Nodes()
is the Nodes API in the Go API client. 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was more pointing out that it hits the /client
API, not /node
! looks like there's no client.go
to have something like c.Clients()
presumably to avoid the name collision of "Nomad client" and "Nomad API client" ... so the Nodes{} (go) API on the (go) API Client{} is used to hit both the /nodes (http) API and the /client (http) API 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Yeah, totally.
Co-authored-by: Daniel Bennett <[email protected]>
The JSON response for the Read Stats client API includes an `AllocDirStats` field. This field is missing in the `api` package, so consumers of the Go API can't use it to read the values we're getting back from the HTTP server. Fixes: #20246
The JSON response for the Read Stats client API includes an
AllocDirStats
field. This field is missing in theapi
package, so consumers of the Go API can't use it to read the values we're getting back from the HTTP server.Fixes: #20246