health

package
v0.0.0-...-5589121 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	Name   string
	Status Status
}

type Health

type Health struct {
	Status     Status      `json:"status"`
	Code       int         `json:"-"`
	Components []Component `json:"components,omitempty"`
}

type HealthHandler

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

func For

func For(r *gin.Engine) *HealthHandler

func (*HealthHandler) WithLiveness

func (h *HealthHandler) WithLiveness(sf StatusFunc) *HealthHandler

func (*HealthHandler) WithReadiness

func (h *HealthHandler) WithReadiness(sf StatusFunc) *HealthHandler

type Status

type Status int
const (
	UP Status = iota
	DOWN
)

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

func (Status) String

func (s Status) String() string

type StatusFunc

type StatusFunc func() Health

Jump to

Keyboard shortcuts

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