Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check interface {
// Check performs the health check and returns an error if unhealthy
Check(ctx context.Context) error
}
Check is the interface that all health checks must implement.
func WithRetries ¶
WithRetries wraps a Check with retry logic.
func WithThreshold ¶
WithThreshold creates a health check that requires a minimum number of checks to pass.
type Config ¶
Config holds common configuration for health checks.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config with sensible defaults.
func (Config) WithRetries ¶
WithRetries sets the number of retries for the health check.
func (Config) WithRetryDelay ¶
WithRetryDelay sets the delay between retries.
Click to show internal directories.
Click to hide internal directories.