health

package
v0.0.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCheck added in v0.0.10

func RegisterCheck(name string, check SubsystemCheck)

RegisterCheck allows an interested subsystem to register a check that will be called when health status is requested.

Types

type SubsystemCheck added in v0.0.10

type SubsystemCheck func() SubsystemStatus

A SubsystemCheck is a function that is supplied by a particular subsystem of the server which then provides informatino about that subsystem during a status poll.

type SubsystemStatus added in v0.0.10

type SubsystemStatus struct {
	OK     bool
	Name   string
	Status string
}

SubsystemStatus contains the information needed to be returned by callback checks to determine worthyness to serve.

func (SubsystemStatus) String added in v0.0.10

func (s SubsystemStatus) String() string

String provides the string representation of the SubsystemStatus

type SystemStatus added in v0.0.10

type SystemStatus struct {
	OK           bool
	FirstFailure SubsystemStatus
	Subsystems   []SubsystemStatus
}

A SystemStatus is returned containing the status of the entire server, and in the event of a failure will have the FirstFailure encountered called out.

func Check added in v0.0.10

func Check() SystemStatus

Check runs all the health checks and returns the aggregate status to the caller.

func (SystemStatus) String added in v0.0.10

func (s SystemStatus) String() string

String provides the string representation of the SystemStatus

Jump to

Keyboard shortcuts

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