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