Description: Idiomatic Go applications heavily utilize channels. Instead of an upstream system (like a Kafka consumer) pulling a message, trying to process it, and getting a "Circuit Open" error, the resilience policy should broadcast its health state proactively so the upstream can pause itself.
Description: Idiomatic Go applications heavily utilize channels. Instead of an upstream system (like a Kafka consumer) pulling a message, trying to process it, and getting a "Circuit Open" error, the resilience policy should broadcast its health state proactively so the upstream can pause itself.
Architecture & Implementation Requirements:
Health() <-chan StateEventmethod to the main Policy and CircuitBreaker interfaces.select { case ch <- event: default: }) so that a slow reader does not lock up the execution loop.Acceptance Criteria:
examples/backpressure/main.go) showing how a worker pool can select on this health channel to dynamically pause and resume processing based on downstream health.