health

package
v4.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 9 Imported by: 14

Documentation

Index

Constants

View Source
const (
	// HealthPath is the path for checking that HTTP service is live
	HealthPath = "/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
}

App of package

func New

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

New creates new App from Config

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) Handler

func (a App) Handler() http.Handler

Handler 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
}

Config of package

func Flags

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

Flags adds flags for configuring package

Jump to

Keyboard shortcuts

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