Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsHealthProvider ¶
Types ¶
type CheckDetail ¶
type CheckDetail struct {
// A human-readable description of the check.
Description string
// Unit of measurement for the observed value.
ObservedUnit string
// Observed value of the check.
ObservedValue int
// Status of the check.
// It can be one of the following values: "pass", "warn", or "fail".
Status Status
}
CheckDetail of a health check.
type CheckResult ¶
type CheckResult struct {
// A map of check names to their respective details.
Checks Checks `json:"checks"`
}
CheckResult represents the result of a set of health checks.
func (CheckResult) Status ¶
func (c CheckResult) Status() Status
Status returns the overall status of the application. It can be one of the following values: "pass", "warn", or "fail".
type Checks ¶
type Checks map[string]CheckDetail
Checks is a map of check names to their respective details.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CheckLiveness ¶
func (s *Service) CheckLiveness(ctx context.Context) CheckResult
func (*Service) CheckReadiness ¶
func (s *Service) CheckReadiness(ctx context.Context) CheckResult
func (*Service) CheckStartup ¶
func (s *Service) CheckStartup(ctx context.Context) CheckResult
Click to show internal directories.
Click to hide internal directories.