Documentation ¶
Index ¶
- func NewServer(options *Options, log logger.LogInfoFormat, checkers []Checker) app.HealthServer
- type Checker
- type CompositeChecker
- type Handler
- type Health
- func (h *Health) AddInfo(key string, value interface{}) *Health
- func (h *Health) Down() *Health
- func (h Health) GetInfo(key string) interface{}
- func (h Health) IsDown() bool
- func (h Health) IsUnknown() bool
- func (h Health) IsUp() bool
- func (h Health) MarshalJSON() ([]byte, error)
- func (h *Health) Unknown() *Health
- func (h *Health) Up() *Health
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(options *Options, log logger.LogInfoFormat, checkers []Checker) app.HealthServer
Types ¶
type CompositeChecker ¶
type CompositeChecker struct {
// contains filtered or unexported fields
}
CompositeChecker aggregate a list of Checkers
func NewCompositeChecker ¶
func NewCompositeChecker() CompositeChecker
NewCompositeChecker creates a new CompositeChecker
func (*CompositeChecker) AddChecker ¶
func (c *CompositeChecker) AddChecker(checker Checker)
AddChecker add a Checker to the aggregator
func (*CompositeChecker) AddInfo ¶
func (c *CompositeChecker) AddInfo(key string, value interface{}) *CompositeChecker
AddInfo adds a info value to the Info map
func (CompositeChecker) Check ¶
func (c CompositeChecker) Check() Health
Check returns the combination of all checkers added if some check is not up, the combined is marked as down
type Handler ¶
type Handler struct {
CompositeChecker
}
Handler is a HTTP Server Handler implementation
type Health ¶
type Health struct {
// contains filtered or unexported fields
}
func (Health) MarshalJSON ¶
MarshalJSON is a custom JSON marshaller
Click to show internal directories.
Click to hide internal directories.