Categorygithub.com/sircelsius/go-service-template
module
0.0.0-20200729121636-7adb35c6c8b9
Repository: https://github.com/sircelsius/go-service-template.git
Documentation: pkg.go.dev

# README

go-service-template

Build Status Go Report Card

An example Go service.

:construction_worker_woman: this is a personal experiment and is not meant to be used as an example of how to create production services in Go.

Features

HTTP API

An HTTP API that uses gorilla/mux. It comes with the following built-ins:

  • a /_system/health health endpoint;
  • automatic deserialization of opentracing headers on incoming requests, if present. The trace ID, Span ID and parent ID are automatically added to all following logs;
  • automatic log decoration with the route name and HTTP method;
  • (optional) automatic JWT token verification. Note that this does not block requests, only passed authentication information down to the next handler.

Logs

Automatically registers a uber/zap logger and exposes it via logging.GetLogger(ctx). Your logs will contain the fields described above.

Tracing

Automatically creates an opentracing Tracer.

Metrics

HTTP endpoints are automatically timed and reported on.

Additional metrics can be added via the Prometheus client.

# Packages

No description provided by the author