chore(deps): bump github.com/TwiN/health from 1.4.0 to 1.5.0
Bumps [github.com/TwiN/health](https://github.com/TwiN/health) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/TwiN/health/releases) - [Commits](https://github.com/TwiN/health/compare/v1.4.0...v1.5.0) --- updated-dependencies: - dependency-name: github.com/TwiN/health dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
11
vendor/github.com/TwiN/health/health.go
generated
vendored
11
vendor/github.com/TwiN/health/health.go
generated
vendored
@ -105,14 +105,19 @@ func SetStatusAndReason(status Status, reason string) {
|
||||
handler.mutex.Unlock()
|
||||
}
|
||||
|
||||
// SetHealthy sets the status to Up and the reason to a blank string
|
||||
func SetHealthy() {
|
||||
// SetStatusAndResetReason sets the status and resets the reason to a blank string
|
||||
func SetStatusAndResetReason(status Status) {
|
||||
handler.mutex.Lock()
|
||||
handler.status = Up
|
||||
handler.status = status
|
||||
handler.reason = ""
|
||||
handler.mutex.Unlock()
|
||||
}
|
||||
|
||||
// SetHealthy sets the status to Up and the reason to a blank string
|
||||
func SetHealthy() {
|
||||
SetStatusAndResetReason(Up)
|
||||
}
|
||||
|
||||
// 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
|
||||
|
Reference in New Issue
Block a user