new-collector-template

command module
v0.0.0-...-17f58c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

README

new-collector-template

Boilerplate for creating new collectors.

Usage

  1. Hit the "Use this template" button to create a new repository from the template.
  2. Run ./template.sh collector-foo-bar.
  3. Make any needed modifications under the proto directory for the collector's API.
  4. 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

What's Included

  • Example collector endpoint
  • Flag configuration under config
  • Boilerplate for creating a gRPC server & gRPC gateway in the server package and main.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 report
    • fmt: Runs gofmt
    • fmtcheck: Checks to see if gofmt needs to run
    • generate: Generates client and server code from the protobuf definitions
    • license: Runs addlicense to populate license headers on source code
    • mocks: Generates a mock for the Rode client
    • test: Runs unit tests
    • vet: Runs go vet

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
proto
v1alpha1
Package v1alpha1 is a reverse proxy.
Package v1alpha1 is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL