code: func (r *controller) checkHealth(ctx context.Context) error {
  	eventq := r.adapter.events(ctx)
  
  	for {
  		select {
  		case <-ctx.Done():
  			return nil
  		case <-r.closed:
  			return nil
  		case event := <-eventq:
  			if !r.matchevent(event) {
  				continue
  			}
  
  			switch event.Action {
  			case "health_status: unhealthy":
  				return ErrContainerUnhealthy
  			}
  		}
  	}
  }
docs: // checkHealth blocks until unhealthy container is detected or ctx exits