shamrickus commented on a change in pull request #4916:
URL: https://github.com/apache/trafficcontrol/pull/4916#discussion_r485804690
##########
File path: traffic_monitor/cache/cache.go
##########
@@ -156,121 +145,142 @@ type Vitals struct {
MaxKbpsOut int64
}
-// Stat is a generic stat, including the untyped value and the time the stat
was taken.
+// Stat is a generic stat, including the untyped value and the time the stat
was
+// taken.
type Stat struct {
Time int64 `json:"time"`
Value interface{} `json:"value"`
}
-// Stats is designed for returning via the API. It contains result history for
each cache, as well as common API data.
+// StatsCache is a representation of cache server statistics as present in the
+// TM API.
+type StatsCache struct {
Review comment:
This is a bit of a nitpick, but this naming is _very_ confusing to me.
You have a Stats object that has a map of StatsCache that has a map of
statistics called Stats.
Perhaps the best solution would be to rename the Stats struct?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]