Documentation ¶
Overview ¶
Package checkclient implements a client for reporting the state of an externally spawned checker pod to Kuberhealthy. The URL that reports are sent to are pulled from the environment variables of the pod because Kuberhealthy sets them all all external checkers when they are spawned.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Debug bool
Debug can be used to enable output logging from the checkClient
Functions ¶
func GetDeadline ¶ added in v2.2.0
GetDeadline fetches the KH_CHECK_RUN_DEADLINE environment variable and returns it. Checks are given up to the deadline to complete their check runs.
func ReportFailure ¶
ReportFailure reports that the external checker has found problems. You may pass a slice of error message strings that will surface in the Kuberhealthy status page for more context on the failure. We do not return an error here because the managing instance of Kuberhealthy for this check will detect the failure to report-in and raise an error upstream.
func ReportSuccess ¶
func ReportSuccess() error
ReportSuccess reports a successful check run to the Kuberhealthy service. We do not return an error here because failures will cause the managing instance of Kuberhealthy to time out and show an error.
Types ¶
This section is empty.