types

package
v0.41.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 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.

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.

func (NoopWatcher) WatchPrefix added in v0.41.1

func (NoopWatcher) WatchPrefix(ctx context.Context, prefix string, keys []string, waitIndex uint64, stopChan chan bool) (uint64, error)

Jump to

Keyboard shortcuts

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