healthx

package
v0.0.0-...-1228a46 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	UP   = "UP"
	DOWN = "DOWN"
)

Variables

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(in struct {
	fx.In
	Resources []*Resource `group:"health_resource"`
}) *Handler

NewHandler is the constructor for handler.

func (*Handler) Status

func (h *Handler) Status(rw http.ResponseWriter, r *http.Request)

type Report

type Report struct {
	Name   string `json:"name"`
	Status string `json:"status"`
	Error  string `json:"error,omitempty"`
}

type Resource

type Resource struct {
	Name    string
	Checker func(ctx context.Context) error
}

func (*Resource) Report

func (r *Resource) Report(ctx context.Context) Report

Jump to

Keyboard shortcuts

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