Categorygithub.com/tscolari/servicetools
module
0.0.2
Repository: https://github.com/tscolari/servicetools.git
Documentation: pkg.go.dev

# README

SERVICETOOLS

This is a highly opinionated, experimental, proof of concept library to help build services/microservices in Go.

This is very unstable as it's constantly being experimented during interactions of other projects.

Documentation and tests will come as soon as I can decide on what this should look like, and if it matures to that point.

Concept

The main goal is to offer modular components, so that services can be built from one or more.

e.g.

type MyService struct{
    *server.WithDB
    *server.WithGRPC
}

Currently, the components are:

  • WithDB: takes a database configuration and exposes DB() (database/sql.DB)
  • WithRDB: sames as WithDB, but meant for "readonly" access. Exposes RDB()
  • WithGRPC: starts a gRPC server internally and mounts all gRPC services that are given to it.
  • WithHTTP: starts a HTTP server internally and mounts all handlers that are given to it.
  • WithMetrics: mounts a basic HTTP server to expose metrics (with optional healthcheck handlers).
  • WithWorker: starts tasks in the background.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
Package nanoid is an opinionated use of the `github.com/matoous/go-nanoid/v2` library.
No description provided by the author
No description provided by the author
No description provided by the author