health

package
v4.47.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 License: MIT Imports: 9 Imported by: 14

Documentation

Index

Constants

View Source
const (
	// LivePath is the path for checking that HTTP service is live.
	LivePath = "/health"

	// ReadyPath is the path for checking that HTTP service is ready (checking dependencies).
	ReadyPath = "/ready"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

func New

func New(config Config, pingers ...model.Pinger) App

func (App) Done

func (a App) Done() <-chan struct{}

Done returns the chan closed when SIGTERM is received.

func (App) End

func (a App) End() <-chan struct{}

End returns the chan closed when graceful duration is over.

func (App) HealthHandler added in v4.43.1

func (a App) HealthHandler() http.Handler

HealthHandler for request. Should be use with net/http.

func (App) ReadyHandler added in v4.43.1

func (a App) ReadyHandler() http.Handler

ReadyHandler for request. Should be use with net/http.

func (App) WaitForTermination

func (a App) WaitForTermination(done <-chan struct{})

WaitForTermination waits for SIGTERM or done plus grace duration.

type Config

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

func Flags

func Flags(fs *flag.FlagSet, prefix string, overrides ...flags.Override) Config

Jump to

Keyboard shortcuts

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