Commit Graph

17 Commits (7fefd96e5e823a1f73e1522d07f35b335e86c80e)

Author SHA1 Message Date
Chris Goller 12348d72cb Refactor to remove autogenerated code. 2016-10-26 22:10:52 -05:00
Chris Goller 8911b0fd78 Update name to chronograf 2016-10-20 09:39:40 -05:00
Tim Raymond ed922e876e Reorg logging package
This moves the logger interface into the root package and makes the log
subpackage specific to logrus. Also this makes the Logger interface type
also return other Loggers, such that we can completely encapsulate
logrus.Loggers.
2016-10-03 12:30:43 -04:00
Tim Raymond 1258f5a1d2 Add logrus for structured logging
This adds the logrus package to facilitate structured logging. Logrus is
encapsulated in the log/ subpackage and currently used in the influx/
subpackage.
2016-10-03 12:30:43 -04:00
Chris Goller b7b5c08951 Fix panic when influx client receives error status code 2016-09-30 10:31:20 -05:00
Chris Goller 83ee76adda Update sources take multiple URLs for future load-balancing 2016-09-29 18:07:54 -05:00
Chris Goller f3805c2130 Add interface and mock for sources 2016-09-29 17:09:22 -05:00
Chris Goller 5d72f12ca5 Update influx to remove the v2 client and use our own.
Signed-off-by: Gunnar Aasen <gunnar+github@gunnar.me>
2016-09-21 17:58:46 -07:00
Chris Goller acdd1992e6 Update Database to be DB 2016-09-21 15:11:29 -07:00
Chris Goller 7eef3f2321 Update database and rp to use default parameters 2016-09-21 09:53:36 -07:00
Chris Goller 1d4d3668d8 Update query interface to take database and rp 2016-09-21 09:53:36 -07:00
Tim Raymond 7a6cba805e Rework domain errs to be strings
At @goller's recommendation, we're following @benbjohnson's advice laid
out here: https://github.com/benbjohnson/wtf/blob/master/errors.go and
moving errors to the top level package. This cleaned up some ugliness in
the tests where we needed to type assert.
2016-09-19 10:12:52 -04:00
Tim Raymond 90104acbc7 Update influx package to support MonitoredServices
The Timeseries interface was updated to include MonitoredServices as
part of its spec. This adds a stub implementation of that.
2016-09-16 12:11:28 -04:00
Tim Raymond d8efea5da7 Add timeout error for influx
This adds a type to be returned when requests to InfluxDB were cancelled
or timed out.
2016-09-15 15:08:25 -04:00
Tim Raymond 05dfabc06b 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 f6ac18b692 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 3116731abe 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