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 2019/09/26 20:12:20 UTC

[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #3758: Rewrote deliveryservice_stats to Go

mitchell852 commented on a change in pull request #3758: Rewrote deliveryservice_stats to Go
URL: https://github.com/apache/trafficcontrol/pull/3758#discussion_r328805167
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##########
 @@ -369,6 +382,78 @@ func (inf *APIInfo) Close() {
 	}
 }
 
+// CreateInfluxClient onstructs and returns an InfluxDB HTTP client, if enabled and when possible.
+// The error this returns should not be exposed to the user; it's for logging purposes only.
+//
+// If Influx connections are not enabled, this will return `nil` - but also no error. It is expected
+// that the caller will handle this situation appropriately.
+func (inf *APIInfo) CreateInfluxClient() (c *influx.Client, e error) {
 
 Review comment:
   just something i read: "Naked return statements should be used only in short functions. They can harm readability in longer functions."
   
   this function doesn't look that short...

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