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 the func of getting system and metrics snapshot by pid #10
Conversation
1 similar comment
Thank you for this. Am Samstag, 10. September 2016 schrieb Coveralls :
|
2 similar comments
) | ||
|
||
// GetMetricsSnapshot will return the snapshot of pid | ||
func (c *Client) GetMetricsSnapshot(pid *Pid) (map[string]interface{}, error) { |
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.
Would it make sense to add a new struct for the snapshot endpoint like you did for System?
With this we get rid of the interface{} and the necessary casting afterwards.
You applied the dummy json already in tests/master1.metrics.snapshot.json
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.
The fields are too much. I will handle it later. :)
Thank you @douzl. |
Signed-off-by: Zhongqiang Dou <douzl0814@163.com>
@andygrunwald Updated with the struct MetricsSnapshot in type.go, please help to review. Thanks! |
Looks good, thank you @douzl! |
Signed-off-by: Zhongqiang Dou douzl0814@163.com