mhoppa commented on a change in pull request #4114: Rewrite current stats from 
Perl to Golang
URL: https://github.com/apache/trafficcontrol/pull/4114#discussion_r352629311
 
 

 ##########
 File path: lib/go-tc/traffic_stats.go
 ##########
 @@ -270,3 +270,24 @@ func MessagesToString(msgs []influx.Message) string {
        b.WriteRune(']')
        return b.String()
 }
+
+// TrafficStatsCDNStats contains summary statistics for a given CDN
+type TrafficStatsCDNStats struct {
+       Bandwidth    *float64 `json:"bandwidth"`
+       Capacity     *float64 `json:"capacity"`
+       CDN          string   `json:"cdn"`
+       Connnections *float64 `json:"connections"`
+}
+
+// TrafficStatsTotalStats contains summary statistics across CDNs
+// Different then TrafficStatsCDNStats as it omits Capacity
+type TrafficStatsTotalStats struct {
+       Bandwidth    *float64 `json:"bandwidth"`
+       CDN          string   `json:"cdn"`
+       Connnections *float64 `json:"connections"`
+}
+
+// TrafficStatsCDNStatsResponse contains response for getting current stats
+type TrafficStatsCDNStatsResponse struct {
+       Response []TrafficStatsCDNStats `json:"response"`
 
 Review comment:
   fixed

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to