health

package
v0.0.0-...-9ba5f82 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Healthcheck(ctx context.Context, fullCheck bool, log *logrus.Entry) *Healthcheck
}

type Component

type Component struct {
	Name     string            `json:"name"`
	Status   HealthcheckStatus `json:"status"`
	Critical bool              `json:"critical"`
}

type Healthcheck

type Healthcheck struct {
	Status     HealthcheckStatus `json:"status"`
	Code       int               `json:"code"`
	Timestamp  time.Time         `json:"timestamp"`
	Components []*Component      `json:"components,omitempty"`
}

type HealthcheckStatus

type HealthcheckStatus string
const (
	HealthcheckOK       HealthcheckStatus = "ok"
	HealthcheckDegraded HealthcheckStatus = "degraded"
	HealthcheckError    HealthcheckStatus = "failure"
)

type Service

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

func NewService

func NewService(db *sqlx.DB) *Service

func (*Service) Healthcheck

func (s *Service) Healthcheck(ctx context.Context, fullCheck bool, log *logrus.Entry) *Healthcheck

Jump to

Keyboard shortcuts

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