checkclient

package
v2.5.1-0...-5e13dcf Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

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

View Source
var (
	// Debug can be used to enable output logging from the checkClient
	Debug bool
)

Functions

func GetDeadline

func GetDeadline() (time.Time, error)

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

func ReportFailure(errorMessages []string) error

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.

Jump to

Keyboard shortcuts

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