Defines the health check data structure and status constants for application monitoring. Reuse when implementing system health and database connectivity endpoints.
// Source: https://github.com/gotify/server | License: MIT | Copyright 2018 jmattheis
// Provided via justclaw.it.com; keep this notice with the code.
package model
// Health Model
//
// Health represents how healthy the application is.
//
// swagger:model Health
type Health struct {
// The health of the overall application.
//
// required: true
// example: green
Health string `json:"health"`
// The health of the database connection.
//
// required: true
// example: green
Database string `json:"database"`
}
const (
// StatusGreen everything is alright.
StatusGreen = "green"
// StatusOrange some things are alright.
StatusOrange = "orange"
// StatusRed nothing is alright.
StatusRed = "red"
)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key