Documentation
¶
Overview ¶
Package health implements post-deployment health checking. After each deployment, the agent polls the application's health endpoint to verify the new version started successfully before committing state.
A failed health check triggers automatic rollback.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitHealthy ¶
func WaitHealthy(ctx context.Context, checkType, rawURL string, retries int, interval, timeout time.Duration) error
WaitHealthy polls the health endpoint until it is healthy or the retry budget is exhausted.
Parameters:
- retries: total number of attempts
- interval: fixed wait between attempts
- timeout: per-request HTTP timeout
Returns nil on success, error after all retries fail.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker polls an HTTP health endpoint.
func NewChecker ¶
NewChecker creates a Checker for the given URL with per-request timeout.
Click to show internal directories.
Click to hide internal directories.