-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for the Charts API #48
Conversation
charts.go
Outdated
Metric string `json:"metric,omitempty"` | ||
Composite string `json:"composite,omitempty"` | ||
Type string `json:"type,omitempty"` | ||
Tags []Tag `json:"tags,omitempty"` |
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.
Can you also add fields here to set:
- summary_function
- group_by_function
- group_by
and the like?
charts.go
Outdated
Max float64 `json:"max,omitempty"` | ||
Label string `json:"label,omitempty"` | ||
RelatedSpace int `json:"related_space,omitempty"` | ||
Threshold Threshold `json:"threshold,omitempty"` |
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.
We will also need transform_function
here, among others.
Doh -- thanks for the reminder, @akahn. I picked this work up from where I'd left it a couple months ago and must've just assumed the struct was complete. I'll update. |
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.
Looks good. Thanks!
charts.go
Outdated
GroupFunction *string `json:"group_function,omitempty"` // valid: average, sum, min, max | ||
GroupBy *string `json:"group_by,omitempty"` | ||
SummaryFunction *string `json:"summary_function,omitempty"` // valid: average, sum, min, max, count | ||
DownsampleFunction *string `json:"downsample_function,omitempty"` // valid: average, min, max, sum, cound |
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.
count
TransformFunction *string `json:"transform_function,omitempty"` | ||
Period *int `json:"period,omitempty"` | ||
Min *int `json:"min,omitempty"` | ||
Max *int `json:"max,omitempty"` |
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 think one field is still missing here: name
:
A display name to use for the stream when generating the tooltip.
Fixes #36
What
Support the Charts API as defined in the docs
Why
Working toward full coverage of the REST API in this client