code: func (rs *RetryingSink) Write(event Event) error {
  	logger := logrus.WithField("event", event)
  
  retry:
  	select {
  	case <-rs.closed:
  		return ErrSinkClosed
  	default:
  	}
  
  	if backoff := rs.strategy.Proceed(event); backoff > 0 {
  		select {
  		case <-time.After(backoff):
  			// TODO(stevvooe): This branch holds up the next try. Before, we
  			// would simply break to the "retry" label and then possibly wait
  			// again. However, this requires all retry strategies to have a
  			// large probability of probing the sync for success, rather than
  			// just backing off and sending the request.
  		case <-rs.closed:
  			return ErrSinkClosed
  		}
  	}
  
  	if err := rs.sink.Write(event); err != nil {
  		if err == ErrSinkClosed {
  			// terminal!
  			return err
  		}
  
  		logger := logger.WithError(err) // shadow!!
  
  		if rs.strategy.Failure(event, err) {
  			logger.Errorf("retryingsink: dropped event")
  			return nil
  		}
  
  		logger.Errorf("retryingsink: error writing event, retrying")
  		goto retry
  	}
  
  	rs.strategy.Success(event)
  	return nil
  }
docs: // Write attempts to flush the events to the downstream sink until it succeeds
  // or the sink is closed.