feat(health)!: promote to v1.0.0 — configurable check timeout via NewHandlerWithConfig
Add Config struct and NewHandlerWithConfig(logger, cfg, checks...) constructor. Config.CheckTimeout sets the per-request deadline for all health checks; zero value defaults to 5 seconds. NewHandler remains unchanged as a backward-compatible wrapper. API committed as stable.
This commit is contained in:
16
CHANGELOG.md
16
CHANGELOG.md
@@ -5,6 +5,22 @@ All notable changes to this module will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.0.0] — 2026-05-12
|
||||
|
||||
### Added
|
||||
|
||||
- `Config` struct — `CheckTimeout time.Duration`; zero value defaults to 5 seconds.
|
||||
- `NewHandlerWithConfig(logger Logger, cfg Config, checks ...Checkable) http.Handler` —
|
||||
constructor with explicit configuration. `NewHandler` is now a backward-compatible
|
||||
wrapper that calls `NewHandlerWithConfig` with zero `Config`.
|
||||
|
||||
### Unchanged
|
||||
|
||||
All existing API (`Level`, `LevelCritical`, `LevelDegraded`, `Checkable`, `Logger`,
|
||||
`ComponentStatus`, `Response`, `NewHandler`) is API-compatible with v0.9.0.
|
||||
|
||||
[1.0.0]: https://code.nochebuena.dev/go/health/releases/tag/v1.0.0
|
||||
|
||||
## [0.9.0] - 2026-03-18
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user