Go struct defining health check statuses (UP, DOWN, DEGRADED) with optional details map for datasource monitoring and observability.
// Source: https://github.com/gofr-dev/gofr | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package datasource
const (
StatusUp = "UP"
StatusDown = "DOWN"
// StatusDegraded is the aggregate an application reports when it is itself serving but at
// least one of its dependencies is down. It is never the status of an individual datasource.
StatusDegraded = "DEGRADED"
)
type Health struct {
Status string `json:"status,omitempty"`
Details map[string]any `json:"details,omitempty"`
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key