Collector provides an API which:
- Takes a golo.Output in json
- Takes a database name from the request path
- Pushes this information into a channel
This channel is, in a gofunc;
- Consumed
- Pushed to various storage locations
Currently we support influx, but adding new storage locations is very simple; the interface is:
type Collector interface {
Push(OutputMapper) error
}
This project is best used with docker:
$ docker run goload/collector --help
Usage of /collector:
-influx string
influx host (default "http://localhost:8086")
The default options will point to influx on localhost, the flag -influx
will change this.
This project strives for high test coverage, and for happy and sad paths to be covered. Please do ensure pull requests have tests with them, where appropriate.
Building and testing can be done with either the standard docker toolchain:
$ go get -u
$ go test -v
$ go build
Or via the convenience wrappers in the Makefile
$ make test collector