Commit Graph

103 Commits (bed327b999582fd25438b241602138a066bae2e2)

Author SHA1 Message Date
Tim Raymond a8291c602c Add coverage for bad hostnames and cancellation
The case where users passed bad hostnames to create new influx clients
was untested as well as the cancellation logic.
2016-09-15 14:01:53 -04:00
Tim Raymond e7562c298f Supprt for cancelling in-flight influx requests
If a request upstream is cancelled, we can propagate the cancellation
down to our queries to Influx using context's cancellation
functionality. This patch adds support for this.
2016-09-15 13:42:56 -04:00
Tim Raymond 2841364ec4 Add influx client
This adds a simple HTTP influx client to fetch time series results. It
implements the TimeSeries interface. Also included is an implementation
of the mrfusion.Results interface that wraps results returned from the
influx client.

We only support HTTP connections (there's also a UDP influx client). We
also require that all Queries to Influx be fully-qualified--they should
include the database and retention policies in the query.

This also makes Resuls a json.Marshaler. In order to hand results back
to clients, we need to guarantee that those results can be serialized to
json in some form. json.Marshaller is just such a guarantee!
2016-09-14 13:46:43 -04:00