Skip to content

About

Runnable example apps for github.com/ubgo/health — registry basics, every HTTP framework adapter (net/http, Gin, Chi, Echo, Fiber), OTEL + Prometheus observability, custom-checker pattern.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

health-examples

Runnable example applications for github.com/ubgo/health.

Each example is a self-contained Go module under its own subdirectory. Clone, cd, and run go run ..

Quick start

git clone https://github.com/ubgo/health-examples.git
cd health-examples/01-basic
go run .

Examples

Basics

  • 01-basic — register checkers, run them, print snapshots for liveness / readiness / startup. No HTTP.

HTTP framework adapters

The same Liveness / Readiness / Startup / Mount shape across all five frameworks.

Observability adapters

  • 06-with-otel — emit OTEL spans for every check (in-memory exporter).
  • 07-with-prometheus — expose health checks as Prometheus metrics at /metrics.

Patterns

  • 08-custom-checker — implement health.Checker for a custom dependency (SDK / client wrapping pattern).

Compatibility

Requires Go 1.24 or later.

License

Apache License 2.0. See LICENSE.

About

Runnable example apps for github.com/ubgo/health — registry basics, every HTTP framework adapter (net/http, Gin, Chi, Echo, Fiber), OTEL + Prometheus observability, custom-checker pattern.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages