You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/04/09 16:23:03 UTC

[GitHub] [trafficcontrol] alficles commented on a change in pull request #4605: Stats over http parse

alficles commented on a change in pull request #4605: Stats over http parse
URL: https://github.com/apache/trafficcontrol/pull/4605#discussion_r406323623
 
 

 ##########
 File path: lib/go-tc/crstates.go
 ##########
 @@ -25,8 +25,8 @@ import (
 
 // CRStates includes availability data for caches and delivery services, as gathered and aggregated by this Traffic Monitor. It is designed to be served at an API endpoint primarily for Traffic Routers (Content Router) to consume.
 type CRStates struct {
-	Caches          map[CacheName]IsAvailable                       `json:"caches"`
-	DeliveryService map[DeliveryServiceName]CRStatesDeliveryService `json:"deliveryServices"`
+	Caches          map[string]IsAvailable             `json:"caches"`
+	DeliveryService map[string]CRStatesDeliveryService `json:"deliveryServices"`
 
 Review comment:
   So, I haven't done a full review, just a once-over of the code mostly looking at how it interfaces with ATS, but why did this change? The CacheName and DeliveryServiceName types generally improve readability and safety, since you'd have to cast to and from them in order to convert them. They help put arguments in context and improve the information in compile errors. I'm curious what the reasoning here.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services