Help us shape the future of Go! Take the 2026 Go Developer Survey

types

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailedHealthChecker

type DetailedHealthChecker interface {
	HealthCheckDetailed(ctx context.Context) (*HealthResult, error)
}

DetailedHealthChecker is an optional interface for backends that provide extended health diagnostics beyond the basic HealthCheck.

type DurationMillis

type DurationMillis time.Duration

DurationMillis is a time.Duration that marshals to JSON as milliseconds.

func (DurationMillis) MarshalJSON

func (d DurationMillis) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler for DurationMillis.

type HealthResult

type HealthResult struct {
	Healthy   bool              `json:"healthy"`
	Message   string            `json:"message"`
	Duration  DurationMillis    `json:"duration_ms"`
	Details   map[string]string `json:"details,omitempty"`
	CheckedAt time.Time         `json:"checked_at"`
}

HealthResult contains detailed health check information.

Jump to

Keyboard shortcuts

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