Skip to content

Given a go-lo result line, parse and store somewhere

License

Notifications You must be signed in to change notification settings

go-lo/collector

Repository files navigation

Go Report Card Build Status GoDoc

Collector

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
}

Usage

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.

Development

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

About

Given a go-lo result line, parse and store somewhere

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published