healthcheck

package
v1.41.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPass = "pass"
	StatusFail = "fail"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Healthcheck(ctx context.Context) error
}

type CheckerFunc

type CheckerFunc func(ctx context.Context) error

func (CheckerFunc) Healthcheck

func (r CheckerFunc) Healthcheck(ctx context.Context) error

type Detail

type Detail struct {
	ComponentName string
	ComponentType string
	Status        string
	Output        string `json:",omitempty"`
	Time          time.Time
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Handler

func (r *Registry) Handler() http.Handler

func (*Registry) Register

func (r *Registry) Register(name string, checker Checker)

type Result

type Result struct {
	Status  string
	Details map[string][]Detail
}

Jump to

Keyboard shortcuts

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