Discover Packages
github.com/gitstore-dev/gitstore/api
internal
health
package
Version:
v0.0.0-...-74adf86
Opens a new window with list of versions in this module.
Published: Apr 28, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Health check handlers for API service
type Check struct {
Status Status `json:"status"`
Message string `json:"message,omitempty"`
}
Check represents an individual health check
Handler provides health check endpoints
NewHandler creates a new health check handler
func (*Handler) Health ¶
Health handles /health endpoint - basic liveness check
Returns 200 if service is running, regardless of dependencies
func (*Handler) Healthz ¶
Healthz is a simple health check endpoint for backwards compatibility
func (*Handler) Ready ¶
Ready handles /ready endpoint - readiness check
Returns 200 only if service is ready to accept traffic
type HealthResponse struct {
Status Status `json:"status"`
Version string `json:"version,omitempty"`
Timestamp time .Time `json:"timestamp"`
Checks map[string ]Check `json:"checks,omitempty"`
}
HealthResponse represents the health check response
Status represents the health status of the service
const (
StatusHealthy Status = "healthy"
StatusDegraded Status = "degraded"
StatusUnhealthy Status = "unhealthy"
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.