healthcheck

package
v0.0.0-...-cbea63e Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StandardInterval = time.Minute
	StandardPriority = hc.Warning
)

Variables

This section is empty.

Functions

func Register

func Register(hc *HealthCheck)

Register will add a healthcheck to our registry, causing it to be tested periodically and reported on

func Status

func Status() *hcproto.Response

Status

Types

type HealthCheck

type HealthCheck struct {
	Id             string        `json:"-"`
	ServiceName    string        `json:"-"`
	ServiceVersion uint64        `json:"-"`
	Hostname       string        `json:"-"`
	InstanceId     string        `json:"-"`
	Checker        hc.Checker    `json:"-"`
	Interval       time.Duration `json:"interval"`
	Priority       hc.Priority   `json:"priority"`
}

HealthCheck represents a single health check

type Sample

type Sample struct {
	At               time.Time
	IsHealthy        bool
	ErrorDescription string
	Measurements     map[string]string
}

Sample represents the results of a single health check sample

Jump to

Keyboard shortcuts

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