Go packages I use to wire services with Uber Fx: configuration, logging, HTTP, health checks, telemetry, and shutdown. The kits share a few conventions but can be used individually.
Requires Go 1.24 or later. The API is still evolving.
go get github.com/froppa/stackkitkits/*— reusable Fx kits (configkit, httpkit, telemetry, etc.)cmd/stackctl— Cobra CLI for working with config discovery/list/check.examples/— runnable skeletons (e.g.service-basicwires HTTP + telemetry).README.md,Makefile,.github/— project docs, tooling, CI.
configkit— layered YAML loader with validation and discovery helpers.logkit— opinionatedzap.Loggersetup plus a calmer Fx event logger (fxeventlog).httpkit— HTTP server module with grouped handlers, graceful shutdown, and optionalpprof.healthkit— readiness/liveness reporting, either on a dedicated port or an existing mux.telemetry— OpenTelemetry traces + metrics, driven by config andruntimeinfo.runtimeinfo— build metadata helpers for logging and observability labels.signals— graceful/forced shutdown coordination.shutdownkit— Fx integration forsignals, exporting named contexts and a sharedWaitGroup.
Run the basic service from a checkout:
go run ./examples/service-basicIt serves /ping and /health on port 8080, with telemetry export disabled.
In another terminal:
curl http://localhost:8080/ping
curl http://localhost:8080/healthThe example shows the complete Fx wiring, including grouped HTTP handlers. Use Ctrl-C to stop the service.
Configuration lives under ./config by default.
- Embed defaults via
configkit.WithEmbeddedBytes. - Override with
config/config.yml,config/config.local.yml, andconfig/<service>.yml(usesruntimeinfo.Name). - Expand
${VAR:default}placeholders at load time.
The CLI uses a separate precedence: config/config.yml, then $CONFIG, then
--config. It registers HTTP and telemetry configuration types.
CLI helpers (from a checkout):
go run ./cmd/stackctl config check --all --config=examples/service-basic/config.ymlgo run ./cmd/stackctl config discovery --from-yaml=examples/service-basic/config.ymlgo run ./cmd/stackctl config list --key=http --config=examples/service-basic/config.yml
With mise installed:
mise install
mise exec -- make allmake all runs vet, lint, and race-enabled tests. make fmt and make tidy
are explicit maintenance commands. make tools installs the pinned linter
if you manage Go yourself.
MIT.