healthcheck

package
v3.31.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package healthcheck provides configuration of startup probes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check func(ctx context.Context) error

Check is a function that determines the health of the HealtChecker.

type HealthChecker

type HealthChecker interface {
	AddHTTPCheck(name string, url string) error
	AddPgCheck(name string, dsn string) error
	AddCheck(name string, check Check) error
	GetHandler() http.Handler
}

HealthChecker manages checks for determining the healhiness of a component.

func NewDefaultHealthChecker

func NewDefaultHealthChecker() (HealthChecker, error)

NewDefaultHealthChecker creates a new HealthCheker implementation using hellofresh/health-go.

Jump to

Keyboard shortcuts

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