// WithStatusListener registers a listener function that will be called whenever the overall/aggregated system health
// status changes (e.g. from "up" to "down"). Attention: Because this listener is also executed for synchronous
// (i.e, request-based) health checks, it should not block processing.
WithStatusListener registers a listener function that will be called whenever the overall/aggregated system health
status changes . Attention: Because this listener is also executed for synchronous
health checks, it should not block processing.
// WithStatusListener registers a listener function that will be called whenever the overall / aggregated system health // status changes ( e . g . from " up " to " down " ) . Attention : Because this listener is also executed for synchronous // ( i . e request - based ) health checks it should not block processing .
func WithStatusListener(listener func(ctx context.Context, state CheckerState)) CheckerOption {
	return func(cfg *checkerConfig) {
		cfg.statusChangeListener = listener
	}
}
func WithStatusListener ( listener func ( ctx context . Context , state CheckerState ) ) CheckerOption { return func ( cfg * checkerConfig ) { cfg . statusChangeListener = listener } }
WithStatusListener registers a listener function that will be called whenever the overall/aggregated system health
status changes .
WithStatusListener registers a listener function that will be called whenever the overall / aggregated system health status changes .