health

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHandler = &Handler{}
View Source
var DefaultPattern = "/health"

Functions

func ListenAndServe

func ListenAndServe(addr string, reporters ...Reporter) error

Types

type Handler

type Handler struct {
	Reporters []Reporter
	ShowErr   bool
}

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Handler) With

func (h *Handler) With(reporters ...Reporter) *Handler

func (*Handler) WithErrors

func (h *Handler) WithErrors() *Handler

type Reporter

type Reporter interface {
	IsHealthy() error
}

Jump to

Keyboard shortcuts

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