Boilerplate for creating new collectors.
- Hit the "Use this template" button to create a new repository from the template.
- Run
./template.sh collector-foo-bar
. - Make any needed modifications under the
proto
directory for the collector's API. - Pick an unallocated port and update the
config
package to replace the default for--port
.- The
config
tests will need to be updated as well
- The
- Example collector endpoint
- Flag configuration under
config
- Boilerplate for creating a gRPC server & gRPC gateway in the
server
package andmain.go
- Dockerfile
- Unit tests, including a mock for the Rode client.
- Protobuf code generation
- GoReleaser config
- Makefile targets for common tasks
coverage
: Runs the tests and opens a browser window with the code coverage reportfmt
: Runsgofmt
fmtcheck
: Checks to see ifgofmt
needs to rungenerate
: Generates client and server code from the protobuf definitionslicense
: Runsaddlicense
to populate license headers on source codemocks
: Generates a mock for the Rode clienttest
: Runs unit testsvet
: Runsgo vet