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/08/31 15:35:57 UTC

[GitHub] [trafficcontrol] ezelkow1 commented on a change in pull request #4993: Adds support for CSV parsing in astats

ezelkow1 commented on a change in pull request #4993:
URL: https://github.com/apache/trafficcontrol/pull/4993#discussion_r480211422



##########
File path: traffic_monitor/cache/stats_types.go
##########
@@ -105,7 +105,7 @@ type StatsDecoder struct {
 // whatever miscellaneous data was in the payload but not represented by
 // the properties of a Statistics object, so that it can be used in later
 // calculations if necessary.
-type StatisticsParser func(string, io.Reader) (Statistics, map[string]interface{}, error)
+type StatisticsParser func(string, io.Reader, interface{}) (Statistics, map[string]interface{}, error)

Review comment:
       I left it as interface{} since this is the generic definition of a parser, so it gets used by any potential stats parser plugins. So specifying it as httppoll ties peoples hands as to what a plugin would be able to accept. So I think its best to leave it as generic as possible




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