Skip to content

add health module#6

Merged
KARTIKrocks merged 2 commits intomainfrom
feature-health
Feb 24, 2026
Merged

add health module#6
KARTIKrocks merged 2 commits intomainfrom
feature-health

Conversation

@KARTIKrocks
Copy link
Owner

Added

  • health — New health package for health check endpoints with dependency checking, timeouts, and standard response formats
  • healthNewChecker(opts...) with functional options pattern and configurable per-check timeout (default 5s)
  • healthAddCheck(name, fn) registers critical checks — failure sets status to "unhealthy" (503)
  • healthAddNonCriticalCheck(name, fn) registers non-critical checks — failure sets status to "degraded" (200)
  • healthCheck(ctx) runs all checks concurrently with per-check timeout and returns aggregated Response
  • healthHandler() returns an error-returning HTTP handler for readiness probes (compatible with router package)
  • healthLiveHandler() returns a liveness probe handler that always responds 200

@KARTIKrocks KARTIKrocks self-assigned this Feb 24, 2026
@KARTIKrocks KARTIKrocks merged commit 48d13be into main Feb 24, 2026
3 checks passed
@KARTIKrocks KARTIKrocks deleted the feature-health branch March 5, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant