healthy

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HealthWatchdog

type HealthWatchdog struct {
	healthcheck.Handler
	// contains filtered or unexported fields
}

HealthWatchdog is a wrapper for healthy services. It takes care of the availability reporting and it automatically switches between ready and unavailable states based on readiness checks.

func NewHealthWatchdog

func NewHealthWatchdog(name, port, healthPort string, service Service) *HealthWatchdog

NewHealthWatchdog returns a watchdog that wraps and monitors the given service.

func (*HealthWatchdog) Run

func (w *HealthWatchdog) Run()

Run runs the healthy Service.

type Service

type Service interface {
	Initialize() (*http.Server, error)
	Live() error
	Ready() error
}

Service is the interface for an HTTP service supporting health queries.

Jump to

Keyboard shortcuts

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