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 ¶
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.
type NoopCloser ¶ added in v0.41.1
type NoopCloser struct{}
NoopCloser is an embeddable struct for backends that hold no resources requiring explicit cleanup.
func (NoopCloser) Close ¶ added in v0.41.1
func (NoopCloser) Close() error
type NoopWatcher ¶ added in v0.41.1
type NoopWatcher struct{}
NoopWatcher is an embeddable struct for polling-only backends that do not support watch mode. It blocks until the context is canceled or the stop channel receives a value or is closed.
Click to show internal directories.
Click to hide internal directories.