healthserver

package
v0.0.0-...-cf6bbf6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2019 License: Apache-2.0 Imports: 2 Imported by: 11

Documentation

Overview

Package healthserver registers HTTP handlers for health and readiness checks

Package healthserver registers HTTP handlers for the /healthz and /readiness paths. These handlers are always registered (this is done at package init time).

By default, the /health handler responds with "OK".

By default, the /readiness handler responds with a "503 Service Unavailable" HTTP status and followed by "not ready".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetHealthy

func SetHealthy()

SetHealthy will make the /healthz HTTP handler respond with "OK".

func SetNotHealthy

func SetNotHealthy(status string)

SetNotHealthy will make the /healthz HTTP handler respond with a "503 Service Unavailable" HTTP status followed by the status string. Passing "" or "OK" for status will result in a panic.

func SetNotReady

func SetNotReady(status string)

SetNotReady will make the /readiness HTTP handler respond with a "503 Service Unavailable" HTTP status followed by the status string. Passing "" or "OK" for status will result in a panic.

func SetReady

func SetReady()

SetReady will make the /readiness HTTP handler respond with "OK".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL