Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetReason ¶ added in v1.2.0
func GetReason() string
GetReason retrieves the current status returned by the health handler
func SetHealthy ¶ added in v1.4.0
func SetHealthy()
SetHealthy sets the status to Up and the reason to a blank string
func SetReason ¶ added in v1.2.0
func SetReason(reason string)
SetReason sets a reason for the current status to be returned by the health handler
func SetStatus ¶
func SetStatus(status Status)
SetStatus sets the status to be returned by the health handler
func SetStatusAndReason ¶ added in v1.3.0
SetStatusAndReason sets the status and reason to be returned by the health handler
func SetStatusAndResetReason ¶ added in v1.5.0
func SetStatusAndResetReason(status Status)
SetStatusAndResetReason sets the status and resets the reason to a blank string
func SetUnhealthy ¶ added in v1.4.0
func SetUnhealthy(reason string)
SetUnhealthy sets the status to Down and the reason to the string passed as parameter
Unlike SetHealthy, this function enforces setting a reason, because it's good practice to give at least a bit of information as to why an application is unhealthy, and this library attempts to promote good practices.