v1/stats.go
raw| 1 | package client |
| 2 | |
| 3 | import "fmt" |
| 4 | |
| 5 | type Stats struct { |
| 6 | Product string `json:"-"` |
| 7 | ClusterID string `json:"cluster_id"` |
| 8 | ServerID string `json:"server_id"` |
| 9 | Data []StatsData `json:"stats"` |
| 10 | } |
| 11 | |
| 12 | type StatsData struct { |
| 13 | Name string `json:"name"` |
| 14 | Tags Tags `json:"tags"` |
| 15 | Values Values `json:"values"` |
| 16 | } |
| 17 | |
| 18 | func (s Stats) Path() string { |
| 19 | return fmt.Sprintf("/stats/%s", s.Product) |
| 20 | } |