This toolkit provides an experimental packages to put together server and pubsub daemons with the following features:
- Standardized configuration and logging
- Health check endpoints with configurable strategies
- Configuration for managing pprof endpoints and log levels
- Basic interfaces to define expectations and vocabulary
- Structured logging containing basic request information
- Useful metrics for endpoints
- Graceful shutdowns
- RPC as the primary messaging pattern
- Event sourcing library
- Supporting messaging patterns other than RPC — e.g. Pub/Sub, CQRS, etc.
- Re-implementing functionality that can be provided by adapting existing software
- Having opinions on operational concerns: deployment, configuration, process supervision, orchestration, etc.
This is an experimental reference for creating microservices in Go.
The rationale behind this package:
- A more opinionated server with fewer choices.
- Gin-Gonic is used for serving HTTP/JSON & gRPC is used for serving HTTP2/RPC
- Monitoring and metrics are handled by a sidecar (ie. Cloud Endpoints)
- Logs always go to stdout/stderr
- Using Go's 1.8 graceful HTTP shutdown
- Services using this package are meant for deploy to Kuberntes.
If you experience any issues please create an issue.
Several reference implementations utilizing server
and pubsub
are available in the examples
subdirectory.
Please see CONTRIBUTING.md.
This project is highly influenced by gizmo and go-kit design.
- go-kit, a programming toolkit for building microservices ★
- gizmo, a microservice toolkit from The New York Times ★
- go-micro, a microservices client/server library ★
- grpc/grpc-go, HTTP/2 based RPC
- sirupsen/logrus, structured, pluggable logging for Go ★
- Architecting for the Cloud — Netflix
- Dapper, a Large-Scale Distributed Systems Tracing Infrastructure — Google
- Your Server as a Function (PDF) — Twitter
Development supported by Insighted4.